This is the mail archive of the gdb-patches@sources.redhat.com 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] |
Hello, considering http://sources.redhat.com/gdb/current/onlinedocs/gdb_8.html , I expect the following behaviour: $ mkdir /src /tmp/bin /tmp/src $ cp /bin/ls /tmp/bin/zzz $ gdb -q (gdb) file /bin/zzz /bin/zzz: Datei oder Verzeichnis nicht gefunden. (gdb) dir /tmp Source directories searched: /tmp:$cdir:$cwd (gdb) file /bin/zzz /bin/zzz: Datei oder Verzeichnis nicht gefunden. (gdb) $ vi /src/a.c $ gcc -g -o /tmp/bin/a /src/a.c $ mv /src/a.c /tmp/src $ gdb -q /tmp/bin/a (gdb) l main 1 /src/a.c: Datei oder Verzeichnis nicht gefunden. in /src/a.c (gdb) dir /tmp Source directories searched: /tmp:$cdir:$cwd (gdb) l main 1 main(){} However, due to a change discussed in http://sources.redhat.com/ml/gdb/2004-01/msg00243.html , gdb isn't able to find the source even after the "directory" command; I consider this to be a bug. We've implemented the change proposed in http://sources.redhat.com/ml/gdb/2004-03/msg00026.html . The patched version behaves the same for binaries, but finds the sources if the "directory" command was issued. I've run the test suite on an i386 platform. The only change was for gdb.cp/annota2.exp from KFAIL to PASS, which is reported to "sometimes fail unexpectedly" in PR gdb/544. The patch applies also to the cvs head. I suggest that it is included for stable and unstable branches. What do you think? I consider this patch to be not legally significant. Please inform me if you need a copyright assignment. ChangeLog entry: * defs.h: exec.c (exec_file_attach): nto-tdep.c (nto_find_and_open_solib): pa64solib.c (pa64_solib_sizeof_symbol_table): solib.c (solib_open): somsolib.c (som_solib_sizeof_symbol_table): source.c (is_regular_file, openp, open_source_file): symfile.c (symfile_bfd_open): wince.c (upload_to_device): Differentiate between the search for binary and source files. With kind regards, Baurjan.
Attachment:
gdb-6.0-ibr-search_in_path-20040310-1302.diff.gz
Description: application/gunzip
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |