From: Chris Johns <cjohns@cybertec.com.au>
To: Eli Zaretskii <eliz@elta.co.il>
Cc: michaelstather@nuzi.de, gdb@sources.redhat.com
Subject: Re: Path handling bug in GDB included with MingW 3.1.0-1
Date: Wed, 08 Oct 2003 00:34:00 -0000 [thread overview]
Message-ID: <3F835B93.3050303@cybertec.com.au> (raw)
In-Reply-To: <1438-Tue07Oct2003231328+0200-eliz@elta.co.il>
Eli Zaretskii wrote:
>>From: "Michael Stather" <michaelstather@nuzi.de>
>>Date: Sun, 5 Oct 2003 23:48:35 +0200
>>
>>g++ -g -o p.exe c:/p/p.cpp -mwindows
>>gdb
>>break "c:/p/p.cpp:7"
>>Run
>>
>>gdb won?t stop at the breakpoint.
>>however if I do:
>>
>>cd c:\m
Not sure if this is suppose to be 'm' or 'p' and if this makes a difference.
>>g++ -g -o p.exe p.cpp -mwindows
>>gdb
>>break "p.cpp:7"
>>run
>>
>>it breaks correctly.
>
>
> Sounds like the MinGW port isn't writing leading directories of the
> files into the debug info.
>
The 5.2.1-1 patch for MinGW stripped a leading '/' from a path for some
reason.
> Questions:
>
> What is the default debug info format used by the MinGW port of GCC?
stabs
>
> Does it help to use -gstabs+ instead of just -g?
>
No change the trace below.
> Do you see the leading directories of the source file names if you
> run "objdump --debug" on the object files?
I tried the 20030930 snapshot with a new MinGW patch the other day and I
could set the break point and gdb stopped. I posted this result to the
MinGW mailing list.
I decided to try gdb 6.0. This is what I have found with a simple hello
world compiled with:
> g++ -g -o p p.cpp -mwindows
and gdb run in a cmd box on XP:
(gdb) info files
Symbols from "C:\p/p.exe".
Local exec file:
`C:\p/p.exe', file type pei-i386.
Entry point: 0x401000
0x00401000 - 0x00433300 is .text
0x00434000 - 0x00435234 is .data
0x00436000 - 0x0043a9e0 is .bss
0x0043b000 - 0x0043b7f4 is .idata
(gdb) b "c:\p/p.cpp:6"
Internal: readin p.cpp pst for `c:\p/p.cpp' found when no symtab found.
(gdb) b "c:/p/p.cpp:6"
Breakpoint 1 at 0x4012da: file p.cpp, line 6.
(gdb) b "c:\p\p.cpp:6"
No source file named c:\p\p.cpp.
(gdb) b "p.cpp:6"
Note: breakpoint 1 also set at pc 0x4012da.
Breakpoint 2 at 0x4012da: file p.cpp, line 6.
(gdb) maintenance info symtabs
{ objfile C:\p/p.exe ((struct objfile *) 010EFB00)
{ symtab p.cpp ((struct symtab *) 011A1D00)
dirname C:/p/
fullname C:/p/p.cpp
blockvector ((struct blockvector *) 01193D10) (primary)
debugformat stabs
}
[snip]
The MinGW patch I used is on SF under the MinGW project. It contains no
changes to the source file or symbol handling in GDB.
--
Chris Johns, cjohns at cybertec.com.au
next prev parent reply other threads:[~2003-10-08 0:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-05 21:48 Michael Stather
2003-10-05 22:48 ` Christopher Faylor
2003-10-07 21:30 ` Eli Zaretskii
2003-10-07 23:22 ` Christopher Faylor
2003-10-08 5:51 ` Eli Zaretskii
2003-10-08 13:43 ` Christopher Faylor
2003-10-08 18:20 ` Support for unofficial GDB (was: Path handling bug in GDB included with MingW 3.1.0-1) Eli Zaretskii
2003-10-08 0:34 ` Chris Johns [this message]
2003-10-08 5:54 ` Path handling bug in GDB included with MingW 3.1.0-1 Eli Zaretskii
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=3F835B93.3050303@cybertec.com.au \
--to=cjohns@cybertec.com.au \
--cc=eliz@elta.co.il \
--cc=gdb@sources.redhat.com \
--cc=michaelstather@nuzi.de \
/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