This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On a slow IO filesystem, like a network file system, this can slow down the performances. gdb takes here 15s to complete the setting of the first breakpoint on an absolute source file path.
In order to let gdb find the files without generating IOs, a simple trick is to check that symbol source file and target source file have the same basename, as source file used at compilation time and the one used for debugging are unlikely to have different basenames. See the patch below against gdb-6.8.
*** gdb/symtab.c Thu Sep 11 11:10:13 2008
--- gdb/symtab.c Thu Sep 11 11:31:46 2008
*************** lookup_partial_symtab (const char *name)
*** 259,264 ****
--- 259,270 ----
return (pst);
}
+ /* Skip this symbol if basenames differ. */
s/symbol/symbol table/ Also, you need two spaces after the full stop.
+ if (FILENAME_CMP (lbasename(name), lbasename(pst->filename)) != 0)
+ {
+ continue;
+ }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |