File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
use Cwd;
10
10
use Cwd ' abs_path' ;
11
- # use File::Spec;
12
11
13
12
sub trim{
14
13
my $string = shift ;
@@ -30,8 +29,18 @@ sub trim{
30
29
# regex is fun
31
30
if ($trimmedLine =~ / ^ *..#modelicaLine .([A-Za-z.\/ ]*):([0-9]*):[0-9]*-[0-9]*:[0-9]*...$ / ) {
32
31
eval {
33
- # $inStmtFile = File::Spec->rel2abs($1); # Absolute paths makes GDB a _lot_ happier;
34
- $inStmtFile = abs_path($1 ); # Absolute paths makes GDB a _lot_ happier;
32
+ if ($^O eq " msys" ) {
33
+ # split the file location
34
+ my @values = split (' /' , $1 );
35
+ # read the filename
36
+ $fileName = pop (@values );
37
+ # join the file location back
38
+ $fileLocation = join (' /' , @values );
39
+ $inStmtFile = abs_path($fileLocation ); # Absolute paths makes GDB a _lot_ happier;
40
+ $inStmtFile = $inStmtFile .' /' .$fileName ;
41
+ } else {
42
+ $inStmtFile = abs_path($1 ); # Absolute paths makes GDB a _lot_ happier;
43
+ }
35
44
};
36
45
if ($@ ) {
37
46
$dir = getcwd();
You can’t perform that action at this time.
0 commit comments