Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* handling of absolute source file paths
@ 2004-04-20 15:49 Baurjan Ismagulov
  2004-04-21  5:51 ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Baurjan Ismagulov @ 2004-04-20 15:49 UTC (permalink / raw)
  To: gdb-patches

[-- 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 --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2004-08-04  7:02 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20 15:49 handling of absolute source file paths Baurjan Ismagulov
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox