public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: RedHat Advanced Server 3 and thread debugging
@ 2005-09-19 20:52 Ajay Patel
  2005-09-19 20:55 ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Ajay Patel @ 2005-09-19 20:52 UTC (permalink / raw)
  To: Daniel Jacobowitz, David Highley, gdb

Daniel,

> On Mon, Sep 19, 2005 at 11:10:33AM -0700, David Highley wrote:
> > "Ajay Patel wrote:"
> > > 
> > > David,
> > > 
> > > GDB is broken for statically linked application.
> > > No body has bothered to fix this.

My apology for the statement.

> > 
> > Has the platform/tool world silently decided not to support static
builds?
> > Does the platform/tool world know all users needs? It must be silent by
> > the lack of documentation!
> 
> Don't take everything you read at face value.  You can find patches in
> the mailing list archive to fix this, and I'll be back to them again
> soon.

I am still interested in the right set of patches.

Thanks
Ajay
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery, LLC
> 
> 


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

* Re: RedHat Advanced Server 3 and thread debugging
  2005-09-19 20:52 RedHat Advanced Server 3 and thread debugging Ajay Patel
@ 2005-09-19 20:55 ` Daniel Jacobowitz
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2005-09-19 20:55 UTC (permalink / raw)
  To: Ajay Patel; +Cc: David Highley, gdb

On Mon, Sep 19, 2005 at 01:51:52PM -0700, Ajay Patel wrote:
> > Don't take everything you read at face value.  You can find patches in
> > the mailing list archive to fix this, and I'll be back to them again
> > soon.
> 
> I am still interested in the right set of patches.

They're the same as the ones in the Debian package, which you say
you've tried.

I don't remember seeing a detailed bug report from you.  What platform
are you running on?  Have you tried a current kernel.org kernel instead
of the RH-provided 2.6.11 that you mentioned?

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: RedHat Advanced Server 3 and thread debugging
@ 2005-09-19 22:45 Ajay Patel
  0 siblings, 0 replies; 11+ messages in thread
From: Ajay Patel @ 2005-09-19 22:45 UTC (permalink / raw)
  To: Daniel Jacobowitz, Ajay Patel, David Highley, gdb

Daniel,

Please see inline.

> They're the same as the ones in the Debian package, which you say
> you've tried.
> 
> I don't remember seeing a detailed bug report from you.

I will re-test it and will send you the information/bug report.

> What platform are you running on?

I have tried both on i386 and PPC (Apple's Emac & PowerMac G5 (32Bit))
running custom distribution.

> Have you tried a current kernel.org kernel instead
> of the RH-provided 2.6.11 that you mentioned?

I have tried that but will try again and send you the info.

Thaks
Ajay

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

* Re: RedHat Advanced Server 3 and thread debugging
@ 2005-09-19 20:42 Ajay Patel
  0 siblings, 0 replies; 11+ messages in thread
From: Ajay Patel @ 2005-09-19 20:42 UTC (permalink / raw)
  To: Mark Kettenis, pkoning, dhighley, gdb


> Well, that all depends on what version of the Linux kernel you're
> running, what version of glibc you're running, and of course what
> version of gdb you're using.

I have tried various combination of glic, kernel
and gdb on different platform. Nothing works for me.

Platform : I386 & PPC
Kernel   : 2.6.9, 2.6.11 & 2.6.11-1.1369_FC4.
Glibc    : 2.3.4 and 2.3.5 with NPTL.
Gdb      : 6.3 and Gdb from Debian CVS.

> 
> It's also important to realize that if you're stripping (parts of)
> your binaries, there's simply not enough information left for gdb to
> produce meaningful backtraces.  If you use -rdynamic, at least there
> is the dynamic symbol table for gdb to use.

The problem is, when brekpoint is encountered in a non-main
thread (or Newly created thread), the GDB terminates with
SIGTRAP.

Thanks
Ajay

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

* Re: RedHat Advanced Server 3 and thread debugging
  2005-09-19 20:38       ` David Highley
@ 2005-09-19 20:41         ` Daniel Jacobowitz
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2005-09-19 20:41 UTC (permalink / raw)
  To: David Highley; +Cc: gdb

On Mon, Sep 19, 2005 at 01:38:32PM -0700, David Highley wrote:
> We do not strip the executables. But oddly no one has addressed the
> original question of whether we get the same thread model between a
> static and dynamic link given we see with the ps command multiple pid's
> for a static link and one pid for dynamic link.

That's because we can't answer it.  It has nothing to do with GDB, and
everything to do with your Linux vendor.  I recommend you ask them.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: RedHat Advanced Server 3 and thread debugging
  2005-09-19 19:17     ` Mark Kettenis
@ 2005-09-19 20:38       ` David Highley
  2005-09-19 20:41         ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: David Highley @ 2005-09-19 20:38 UTC (permalink / raw)
  To: gdb

"Mark Kettenis wrote:"
> 
> > Date: Mon, 19 Sep 2005 14:13:39 -0400
> > From: Paul Koning <pkoning@equallogic.com>
> > 
> >  David> "Ajay Patel wrote:"
> >  >> David,
> >  >> 
> >  >> GDB is broken for statically linked application.  No body has
> >  >> bothered to fix this.
> > 
> >  David> Has the platform/tool world silently decided not to support
> >  David> static builds?  
> > 
> > I think Ajay is confused.  Debugging statically linked applications
> > works just fine; if anything, it's the more reliable case since it is
> > the simpler case.
> > 
> 
> Well, that all depends on what version of the Linux kernel you're
> running, what version of glibc you're running, and of course what
> version of gdb you're using.

Kernel: 2.4.21-27.0.2.ELsmp
Glibc: 2.3.2-95.27
gcc: 3.2.3-42
gdb: 6.1post-1.20040607.17

> It's also important to realize that if you're stripping (parts of)
> your binaries, there's simply not enough information left for gdb to
> produce meaningful backtraces.  If you use -rdynamic, at least there
> is the dynamic symbol table for gdb to use.

We do not strip the executables. But oddly no one has addressed the
original question of whether we get the same thread model between a
static and dynamic link given we see with the ps command multiple pid's
for a static link and one pid for dynamic link.

Then there was a reply that indicated there were patches, but no
furthur information. Do we need to patch the; OS, gcc, ld, gdb, etc.

> Mark
> 

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

* Re: RedHat Advanced Server 3 and thread debugging
  2005-09-19 18:13   ` Paul Koning
@ 2005-09-19 19:17     ` Mark Kettenis
  2005-09-19 20:38       ` David Highley
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Kettenis @ 2005-09-19 19:17 UTC (permalink / raw)
  To: pkoning; +Cc: dhighley, gdb

> Date: Mon, 19 Sep 2005 14:13:39 -0400
> From: Paul Koning <pkoning@equallogic.com>
> 
>  David> "Ajay Patel wrote:"
>  >> David,
>  >> 
>  >> GDB is broken for statically linked application.  No body has
>  >> bothered to fix this.
> 
>  David> Has the platform/tool world silently decided not to support
>  David> static builds?  
> 
> I think Ajay is confused.  Debugging statically linked applications
> works just fine; if anything, it's the more reliable case since it is
> the simpler case.
> 

Well, that all depends on what version of the Linux kernel you're
running, what version of glibc you're running, and of course what
version of gdb you're using.

It's also important to realize that if you're stripping (parts of)
your binaries, there's simply not enough information left for gdb to
produce meaningful backtraces.  If you use -rdynamic, at least there
is the dynamic symbol table for gdb to use.

Mark

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

* Re: RedHat Advanced Server 3 and thread debugging
  2005-09-19 18:10 ` David Highley
  2005-09-19 18:12   ` Daniel Jacobowitz
@ 2005-09-19 18:13   ` Paul Koning
  2005-09-19 19:17     ` Mark Kettenis
  1 sibling, 1 reply; 11+ messages in thread
From: Paul Koning @ 2005-09-19 18:13 UTC (permalink / raw)
  To: dhighley; +Cc: gdb

>>>>> "David" == David Highley <dhighley@highley-recommended.com> writes:

 David> "Ajay Patel wrote:"
 >> David,
 >> 
 >> GDB is broken for statically linked application.  No body has
 >> bothered to fix this.

 David> Has the platform/tool world silently decided not to support
 David> static builds?  

I think Ajay is confused.  Debugging statically linked applications
works just fine; if anything, it's the more reliable case since it is
the simpler case.

  paul

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

* Re: RedHat Advanced Server 3 and thread debugging
  2005-09-19 18:10 ` David Highley
@ 2005-09-19 18:12   ` Daniel Jacobowitz
  2005-09-19 18:13   ` Paul Koning
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2005-09-19 18:12 UTC (permalink / raw)
  To: David Highley; +Cc: gdb

On Mon, Sep 19, 2005 at 11:10:33AM -0700, David Highley wrote:
> "Ajay Patel wrote:"
> > 
> > David,
> > 
> > GDB is broken for statically linked application.
> > No body has bothered to fix this.
> 
> Has the platform/tool world silently decided not to support static builds?
> Does the platform/tool world know all users needs? It must be silent by
> the lack of documentation!

Don't take everything you read at face value.  You can find patches in
the mailing list archive to fix this, and I'll be back to them again
soon.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: RedHat Advanced Server 3 and thread debugging
       [not found] <1127149130.20359@horse.he.net>
@ 2005-09-19 18:10 ` David Highley
  2005-09-19 18:12   ` Daniel Jacobowitz
  2005-09-19 18:13   ` Paul Koning
  0 siblings, 2 replies; 11+ messages in thread
From: David Highley @ 2005-09-19 18:10 UTC (permalink / raw)
  To: gdb

"Ajay Patel wrote:"
> 
> David,
> 
> GDB is broken for statically linked application.
> No body has bothered to fix this.

Has the platform/tool world silently decided not to support static builds?
Does the platform/tool world know all users needs? It must be silent by
the lack of documentation!

> Thanks
> Ajay
> 
> 
> > We have implemented and a large application that is built on many
> > different operating systems with platform native tools. For Linux we use
> > the RedHat Advanced Server 3 update 3 platform. Development has a lot of
> > problems debugging threaded applications on this platform.
> > 
> > We build our applications static. Today one of the developers rebuilt
> > an application using the apparently undocumented option -rdynamic and
> > found that he was able to get better trace back information. Then
> > dynamic link was done and he found that still more debugging
> > information was available. Another thing they noticed was instead of one
> > pid per thread there was just one pid. Which now leads us to wonder if
> > we have the same thread model in a static link and a dynamic link.
> > 
> > Can anyone shed some intelligent light on these observations. For a
> > concept that is so widely used it seems difficult to get very good
> > information on any platform.
> > 
> > 
> 
> 

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

* RedHat Advanced Server 3 and thread debugging
@ 2005-09-17  3:00 David Highley
  0 siblings, 0 replies; 11+ messages in thread
From: David Highley @ 2005-09-17  3:00 UTC (permalink / raw)
  To: gdb

We have implemented and a large application that is built on many
different operating systems with platform native tools. For Linux we use
the RedHat Advanced Server 3 update 3 platform. Development has a lot of
problems debugging threaded applications on this platform.

We build our applications static. Today one of the developers rebuilt
an application using the apparently undocumented option -rdynamic and
found that he was able to get better trace back information. Then
dynamic link was done and he found that still more debugging
information was available. Another thing they noticed was instead of one
pid per thread there was just one pid. Which now leads us to wonder if
we have the same thread model in a static link and a dynamic link.

Can anyone shed some intelligent light on these observations. For a
concept that is so widely used it seems difficult to get very good
information on any platform.

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

end of thread, other threads:[~2005-09-19 22:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-19 20:52 RedHat Advanced Server 3 and thread debugging Ajay Patel
2005-09-19 20:55 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2005-09-19 22:45 Ajay Patel
2005-09-19 20:42 Ajay Patel
     [not found] <1127149130.20359@horse.he.net>
2005-09-19 18:10 ` David Highley
2005-09-19 18:12   ` Daniel Jacobowitz
2005-09-19 18:13   ` Paul Koning
2005-09-19 19:17     ` Mark Kettenis
2005-09-19 20:38       ` David Highley
2005-09-19 20:41         ` Daniel Jacobowitz
2005-09-17  3:00 David Highley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).