From: Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr>
To: gdb-patches@sources.redhat.com
Subject: handling of absolute source file paths
Date: Tue, 20 Apr 2004 15:49:00 -0000 [thread overview]
Message-ID: <20040420154855.GD9020@ata.cs.hacettepe.edu.tr> (raw)
[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]
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 #2: gdb-6.0-ibr-search_in_path-20040310-1302.diff.gz --]
[-- Type: application/x-gunzip, Size: 2937 bytes --]
next reply other threads:[~2004-04-20 15:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 15:49 Baurjan Ismagulov [this message]
2004-04-21 5:51 ` Eli Zaretskii
2004-04-21 11:10 ` Baurjan Ismagulov
2004-05-01 17:01 ` Baurjan Ismagulov
2004-05-02 13:15 ` Eli Zaretskii
2004-05-01 17:12 ` Baurjan Ismagulov
2004-05-01 18:11 ` Eli Zaretskii
2004-05-08 21:20 ` Baurjan Ismagulov
2004-05-09 14:33 ` Eli Zaretskii
2004-05-09 13:53 ` Baurjan Ismagulov
2004-05-11 16:08 ` Eli Zaretskii
2004-07-17 18:20 ` Baurjan Ismagulov
2004-07-23 19:55 ` ping: " Baurjan Ismagulov
2004-07-24 7:21 ` Eli Zaretskii
2004-07-26 14:57 ` Andrew Cagney
2004-07-26 15:20 ` Baurjan Ismagulov
2004-07-26 17:48 ` Eli Zaretskii
2004-07-26 18:15 ` Andrew Cagney
2004-07-26 17:47 ` Eli Zaretskii
2004-07-30 19:19 ` Eli Zaretskii
2004-07-31 7:57 ` Baurjan Ismagulov
2004-07-31 8:25 ` Eli Zaretskii
2004-08-01 19:31 ` Andrew Cagney
2004-08-03 16:59 ` Baurjan Ismagulov
2004-08-03 19:12 ` Eli Zaretskii
2004-08-04 7:02 ` Baurjan Ismagulov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040420154855.GD9020@ata.cs.hacettepe.edu.tr \
--to=ibr@ata.cs.hun.edu.tr \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox