Bug 91988 - cannot get gdb to stop at breakpoint in child thread
cannot get gdb to stop at breakpoint in child thread
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gdb (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnston
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-30 14:02 EDT by Ken Savela
Modified: 2015-01-07 19:05 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-25 14:39:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ken Savela 2003-05-30 14:02:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208
Netscape/7.02

Description of problem:
I'll set a breakpoint in a C++ class method that is called on a thread other
than the process's original thread.  When the app is then "run", a 

    Program received signal SIGTRAP, Trace/breakpoint trap.

is displayed by gdb and a "where" indicates that the location -- not the
requested one but another location altogether -- at which the app stopped is
part of the main thread, not the child thread.



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
see the additional information below...
    

Additional info:

[eoops@ksavela4 Z_prodsim_2]$ dbg
GNU gdb Red Hat Linux (5.2.1-4)

<snip...>

This GDB was configured as "i386-redhat-linux"...
(gdb) break FileWriter::ProcessPulse
Breakpoint 1 at 0x8072c43: file filewriter.cc, line 326.
(gdb) run
Starting program: /home/ots/version/sysapps/prodsim/DEV/prodsim 
PRODSIM - version 2.0.0

   <snip...>

Thread AUDITLOG (16387) started
Thread AUDITLOG.emitter (24580) started

Program received signal SIGTRAP, Trace/breakpoint trap.
TagValueGen::create(Str const&, Str const&, Str const&, TVMsg const*) (
    uname=@0x82d0288, cls=@0xbfffe780, instance=@0xbfffe770, cfg=0x8c58dc0)
    at tv_gen.cc:223
223     {
(gdb) where
#0  TagValueGen::create(Str const&, Str const&, Str const&, TVMsg const*) (
    uname=@0x82d0288, cls=@0xbfffe780, instance=@0xbfffe770, cfg=0x8c58dc0)
    at tv_gen.cc:223
#1  0x08097ea3 in ComponentManager::createStreamHeads(Str const&, DbHandler*) (
    this=0xbffff2bc, clientId=@0x82d0288, dbh=0xbfffe9e0) at compmgr.cc:55
#2  0x0809987e in ComponentManager::load(Str const&, DbHandler*) (
    this=0xbffff2bc, clientId=@0x82d0288, dbh=0xbfffe9e0) at compmgr.cc:194
#3  0x080670bd in SysCtl::init(int, char**) (this=0xbffff2b0, ac=1, 
    av=0xbffff544) at ctl.cc:115
#4  0x080516a6 in main (ac=1, av=0xbffff544) at prodsim.cc:110
#5  0x081b94c2 in __libc_start_main ()
Comment 1 John Slaby 2003-06-06 14:30:51 EDT
I am finding the same problem with RH 9.0. I pulled down the latest gdb and 
rebuilt it with no success. I have run gdb under both KDevelop and stand-alone 
with the same results. In addition to the SIGTRAP not stopping at a breakpoint, 
I have also seen SIGSEGV errors (my bugs) that are not trapped by the debugger -
 they simply cause the app to abort. The debugger thinks it is still running. 
When I reworked my source to eliminate the threads, everything works fine.
Comment 2 Jeff Johnston 2003-08-22 15:17:05 EDT
Does the problem still occur with latest rpms installed
(kernel, glibc, gdb specifically)?
Comment 3 John Slaby 2003-08-23 11:13:19 EDT
I was able to correct the problem with RH 9.0 by reinstalling gdb. 
Comment 4 Jeff Johnston 2003-08-25 14:39:48 EDT
Thanks for the confirmation.  I am closing the bug.

Note You need to log in before you can comment on or make changes to this bug.