Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Path problem with dwarf on cygwin
@ 2006-11-29 15:40 Fabian Cenedese
  2006-11-29 15:43 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Cenedese @ 2006-11-29 15:40 UTC (permalink / raw)
  To: gdb

Hi

I have another problem. This is again with gcc 4.1.0 and gdb 6.5 both
configured as host=cygwin, target=ppc-eabi (not literally :)

If I compile my project with -gstabs I don't seem to have any problems.
There are some warnings when I load the file but I can work with it.
But with dwarf debug info gdb has quite some problems resolving
files.

stabs:
Reading symbols from /data/gdb-6.5/gdb/gccext3-41s.x...
unknown symbol type 0x1e...expanding to full symbols...couldn't parse type; debu
gger out of date?...block end address less than block start address in fixed32::
fixed32(short, unsigned short) (patched it)...inner block (0xa8e58-0xa8e58) not
inside outer block (0x21d0-0x70950)...inner block not inside outer block in CINO
SModule::CINOSModule(long, char*, char*, char*, char*, char*, char*, char*, char
*, char*)...done.

(gdb) info line N:\Indel-PPC\Tests\gccext3\applicat\src\CTaskTemplateClass.cpp:142
Line 142 of "N:\Indel-PPC\Tests\gccext3\applicat\src\CTaskTemplateClass.cpp"
   starts at address 0xebd8 <_ZN17_TASK_CLASS_NAME_6ActionEv+184>
   and ends at 0xebdc <_ZN17_TASK_CLASS_NAME_D0Ev>.

dwarf:
Reading symbols from /data/gdb-6.5/gdb/gccext3-41d.x...unknown symbol type 0x1e.
..expanding to full symbols...Location list used without specifying the CU base
address....unsupported const value attribute form: 'DW_FORM_strp'...done.

(gdb) info line N:\Indel-PPC\Tests\gccext3\applicat\src\CTaskTemplateClass.cpp:142
Line number 142 is out of range for "N:\Indel-PPC\Tests\gccext3\applicat\src\CTaskTemplateClass.cpp".
(gdb) info line N:\Indel-PPC\Tests\gccext3\applicat\src/CTaskTemplateClass.cpp:142
Line number 142 is out of range for "N:\Indel-PPC\Tests\gccext3\applicat\src\CTaskTemplateClass.cpp".
(Other combinations of / and \ didn't work either).

After dumping all symbols I found that I have two symtabs for this file, one
has a linetable, the other does not. The only difference is the last path separator.

Symtab for file N:\Indel-PPC\Tests\gccext3\applicat\src\CTaskTemplateClass.cpp
Language: c++

Blockvector:
...

Symtab for file N:\Indel-PPC\Tests\gccext3\applicat\src/CTaskTemplateClass.cpp
Language: c++
Line table:
...
line 142 at 0xebd8
...
Blockvector same as previous symtab

How can this happen? Is this a problem of gcc or gdb? As I call gcc directly,
not from inside the cygwin shell, I give all paths with backslashes. So why is
there one with a forward slash?

Is there a possibility to tell gdb that these are the same files and not
create two symtabs? Or maybe a flag for configure of gcc/gdb? Something
like the textmode.o module for cygwin compiled programs.

Thanks

bye  Fabi



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

* Re: Path problem with dwarf on cygwin
  2006-11-29 15:40 Path problem with dwarf on cygwin Fabian Cenedese
@ 2006-11-29 15:43 ` Daniel Jacobowitz
  2006-11-29 16:12   ` Fabian Cenedese
  2006-11-29 18:39   ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-11-29 15:43 UTC (permalink / raw)
  To: Fabian Cenedese; +Cc: gdb

On Wed, Nov 29, 2006 at 04:38:41PM +0100, Fabian Cenedese wrote:
> How can this happen? Is this a problem of gcc or gdb? As I call gcc directly,
> not from inside the cygwin shell, I give all paths with backslashes. So why is
> there one with a forward slash?
> 
> Is there a possibility to tell gdb that these are the same files and not
> create two symtabs? Or maybe a flag for configure of gcc/gdb? Something
> like the textmode.o module for cygwin compiled programs.

I said a couple of weeks ago that I had a really nasty patch for this
problem, but never got around to cleaning it up.  You've built a Cygwin
GDB, therefore when it needs to construct a path, it uses forward
slashes.  Yet your debugging info matches what you gave the compiler,
i.e. has backwards slashes.  The debugger needs to be taught smarter
filename comparison.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Path problem with dwarf on cygwin
  2006-11-29 15:43 ` Daniel Jacobowitz
@ 2006-11-29 16:12   ` Fabian Cenedese
  2006-11-29 16:13     ` Daniel Jacobowitz
  2006-11-29 18:39   ` Eli Zaretskii
  1 sibling, 1 reply; 7+ messages in thread
From: Fabian Cenedese @ 2006-11-29 16:12 UTC (permalink / raw)
  To: gdb

At 10:42 29.11.2006 -0500, Daniel Jacobowitz wrote:
>On Wed, Nov 29, 2006 at 04:38:41PM +0100, Fabian Cenedese wrote:
>> How can this happen? Is this a problem of gcc or gdb? As I call gcc directly,
>> not from inside the cygwin shell, I give all paths with backslashes. So why is
>> there one with a forward slash?
>> 
>> Is there a possibility to tell gdb that these are the same files and not
>> create two symtabs? Or maybe a flag for configure of gcc/gdb? Something
>> like the textmode.o module for cygwin compiled programs.
>
>I said a couple of weeks ago that I had a really nasty patch for this
>problem, but never got around to cleaning it up.  You've built a Cygwin
>GDB, therefore when it needs to construct a path, it uses forward
>slashes.  Yet your debugging info matches what you gave the compiler,
>i.e. has backwards slashes.  The debugger needs to be taught smarter
>filename comparison.

But apparently this only affects dwarf info, is that correct? Can I
work around this by supplying pathes with all forward slashes?

Thanks

bye  Fabi



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

* Re: Path problem with dwarf on cygwin
  2006-11-29 16:12   ` Fabian Cenedese
@ 2006-11-29 16:13     ` Daniel Jacobowitz
  2006-11-29 16:24       ` Fabian Cenedese
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-11-29 16:13 UTC (permalink / raw)
  To: Fabian Cenedese; +Cc: gdb

On Wed, Nov 29, 2006 at 05:11:02PM +0100, Fabian Cenedese wrote:
> But apparently this only affects dwarf info, is that correct? Can I
> work around this by supplying pathes with all forward slashes?

Well, it does affect dwarf, but I don't know where else it might.
All forward slashes will probably work for now.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Path problem with dwarf on cygwin
  2006-11-29 16:13     ` Daniel Jacobowitz
@ 2006-11-29 16:24       ` Fabian Cenedese
  0 siblings, 0 replies; 7+ messages in thread
From: Fabian Cenedese @ 2006-11-29 16:24 UTC (permalink / raw)
  To: gdb

At 11:13 29.11.2006 -0500, Daniel Jacobowitz wrote:
>On Wed, Nov 29, 2006 at 05:11:02PM +0100, Fabian Cenedese wrote:
>> But apparently this only affects dwarf info, is that correct? Can I
>> work around this by supplying pathes with all forward slashes?
>
>Well, it does affect dwarf, but I don't know where else it might.
>All forward slashes will probably work for now.

Thanks, I'll try that.

bye  Fabi



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

* Re: Path problem with dwarf on cygwin
  2006-11-29 15:43 ` Daniel Jacobowitz
  2006-11-29 16:12   ` Fabian Cenedese
@ 2006-11-29 18:39   ` Eli Zaretskii
  2006-11-29 19:05     ` Daniel Jacobowitz
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2006-11-29 18:39 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Cenedese, gdb

> Date: Wed, 29 Nov 2006 10:42:58 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sourceware.org
> 
> I said a couple of weeks ago that I had a really nasty patch for this
> problem, but never got around to cleaning it up.  You've built a Cygwin
> GDB, therefore when it needs to construct a path, it uses forward
> slashes.  Yet your debugging info matches what you gave the compiler,
> i.e. has backwards slashes.  The debugger needs to be taught smarter
> filename comparison.

Why ``nasty''?  Isn't it enough to modify the FILENAME_CMP macro, and
be done with that?  If not, what else need to be changed, and why?


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

* Re: Path problem with dwarf on cygwin
  2006-11-29 18:39   ` Eli Zaretskii
@ 2006-11-29 19:05     ` Daniel Jacobowitz
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-11-29 19:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Cenedese, gdb

On Wed, Nov 29, 2006 at 08:39:11PM +0200, Eli Zaretskii wrote:
> > Date: Wed, 29 Nov 2006 10:42:58 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: gdb@sourceware.org
> > 
> > I said a couple of weeks ago that I had a really nasty patch for this
> > problem, but never got around to cleaning it up.  You've built a Cygwin
> > GDB, therefore when it needs to construct a path, it uses forward
> > slashes.  Yet your debugging info matches what you gave the compiler,
> > i.e. has backwards slashes.  The debugger needs to be taught smarter
> > filename comparison.
> 
> Why ``nasty''?  Isn't it enough to modify the FILENAME_CMP macro, and
> be done with that?  If not, what else need to be changed, and why?

I didn't say that the proper solution was nasty, just that my first
version of the code was :-)  It won't be hard to clean up, if I can
find the time.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2006-11-29 19:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-29 15:40 Path problem with dwarf on cygwin Fabian Cenedese
2006-11-29 15:43 ` Daniel Jacobowitz
2006-11-29 16:12   ` Fabian Cenedese
2006-11-29 16:13     ` Daniel Jacobowitz
2006-11-29 16:24       ` Fabian Cenedese
2006-11-29 18:39   ` Eli Zaretskii
2006-11-29 19:05     ` Daniel Jacobowitz

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