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 ()
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.
Does the problem still occur with latest rpms installed (kernel, glibc, gdb specifically)?
I was able to correct the problem with RH 9.0 by reinstalling gdb.
Thanks for the confirmation. I am closing the bug.