HCoop
/
clinton
/
Virtual-Jaguar-Rx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
57f4003
)
DWARF source code directory path clean-up
author
Jean-Paul Mari
<djipi.mari@gmail.com>
Sun, 23 Sep 2018 21:55:50 +0000
(17:55 -0400)
committer
Jean-Paul Mari
<djipi.mari@gmail.com>
Sun, 23 Sep 2018 21:55:50 +0000
(17:55 -0400)
src/debugger/DWARFManager.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/debugger/DWARFManager.cpp
b/src/debugger/DWARFManager.cpp
index
b064bee
..
bba80ea
100644
(file)
--- a/
src/debugger/DWARFManager.cpp
+++ b/
src/debugger/DWARFManager.cpp
@@
-284,7
+284,7
@@
void DWARFManager_InitDMI(void)
FILE *SrcFile;
\r
size_t i, j, k;
\r
char *return_string;
\r
FILE *SrcFile;
\r
size_t i, j, k;
\r
char *return_string;
\r
- char *Ptr;
\r
+ char *Ptr
, *Ptr1
;
\r
\r
// Initialisation for the Compilation Units table
\r
NbCU = 0;
\r
\r
// Initialisation for the Compilation Units table
\r
NbCU = 0;
\r
@@
-419,6
+419,21
@@
void DWARFManager_InitDMI(void)
Ptr++;
\r
}
\r
\r
Ptr++;
\r
}
\r
\r
+ // Directory path clean-up
\r
+#if defined(_WIN32)
\r
+ while ((Ptr1 = Ptr = strstr(PtrCU[NbCU].PtrFullFilename, "\\..\\")))
\r
+#else
\r
+ while ((Ptr1 = Ptr = strstr(PtrCU[NbCU].PtrFullFilename, "/../")))
\r
+#endif
\r
+ {
\r
+#if defined(_WIN32)
\r
+ while (*--Ptr1 != '\\');
\r
+#else
\r
+ while (*--Ptr1 != '/');
\r
+#endif
\r
+ strcpy((Ptr1 + 1), (Ptr + 4));
\r
+ }
\r
+
\r
// Read the file as text
\r
#ifndef __CYGWIN__
\r
if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rt"))
\r
// Read the file as text
\r
#ifndef __CYGWIN__
\r
if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rt"))
\r