* SIG32/SIGTRAP issues
@ 2002-12-03 14:52 Paul Mundt
2002-12-03 15:24 ` Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Paul Mundt @ 2002-12-03 14:52 UTC (permalink / raw)
To: gdb
[-- Attachment #1: Type: text/plain, Size: 4040 bytes --]
Hi,
I seem to be running into a bit of an odd problem. When I have a
threaded application thats shared, everything works fine .. in the event
that the application is statically linked however, gdb gets a SIG32 at
pthread_create() time and doesn't track the threads properly.
Using the following code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#define MAX_NUM_THREADS 1024
void *thread_func( void * not_used )
{
printf("Starting real thread %d\n", *(int *)not_used);
sleep(2);
printf("Ending thread\n");
}
main()
{
int i,j,k;
int num_of_threads;
pthread_t thread[MAX_NUM_THREADS];
printf("Enter the number of threads reqd(<=1024): ");
scanf("%d", &num_of_threads);
for ( i=0; i<num_of_threads; i++ ) {
printf("Starting thread %d\n", i);
if ( pthread_create( &(thread[i]), NULL, thread_func, &i ) != 0 )
perror("");
printf("created thread %d\n", i);
}
for ( i=0; i<num_of_threads; i++ ) {
pthread_join( thread[i], NULL );
}
}
Running shared, everything looks okay:
[root@lemur gdb-build]# gdb/gdb
GNU gdb 5.2.90_2002-12-03-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) file /mnt/test-shared
Reading symbols from /mnt/test-shared...done.
(gdb) break thread_func
Breakpoint 1 at 0x80485c6
(gdb) run
Starting program: /mnt/test-shared
[New Thread 1024 (LWP 24053)]
Enter the number of threads reqd(<=1024): 2
Starting thread 0
[New Thread 2049 (LWP 24054)]
[New Thread 1026 (LWP 24055)]
created thread 0
Starting thread 1
[Switching to Thread 1026 (LWP 24055)]
Breakpoint 1, 0x080485c6 in thread_func ()
(gdb) c
Continuing.
Starting real thread 1
[New Thread 2051 (LWP 24056)]
Ending thread
created thread 1
[Switching to Thread 2051 (LWP 24056)]
Breakpoint 1, 0x080485c6 in thread_func ()
(gdb) c
Continuing.
Starting real thread 1
Ending thread
Program exited with code 02.
(gdb)
But when I run it statically, I get the following:
[root@lemur gdb-build]# gdb/gdb
GNU gdb 5.2.90_2002-12-03-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) file /mnt/test-static
Reading symbols from /mnt/test-static...done.
(gdb) break thread_func
Breakpoint 1 at 0x80481e6
(gdb) run
Starting program: /mnt/test-static
Enter the number of threads reqd(<=1024): 2
Starting thread 0
Program received signal SIG32, Real-time event 32.
0x0804e6c6 in __sigsuspend (set=0xbfffe970) at
../sysdeps/unix/sysv/linux/sigsuspend.c:45
45 ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or
directory.
in ../sysdeps/unix/sysv/linux/sigsuspend.c
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
pthread_handle_sigrestart (sig=-1073747600) at pthread.c:825
825 pthread.c: No such file or directory.
in pthread.c
(gdb) c
Continuing.
created thread 0
Starting thread 1
and at that point it just sits there and hangs indefinitely.
If I omit the break, I don't get the SIGTRAP (obviously) and it runs
through fine, though I'm not able to track any kind of thread
information while its running.
Looking through the PRs and gdb/PROBLEMS, I don't see this mentioned
anywhere. Is this a known problem?
This same behavior is also observed under 5.2/5.2.1 on both x86/ppc.
Regards,
--
Paul Mundt <paul.mundt@timesys.com>
TimeSys Corporation
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 14:52 SIG32/SIGTRAP issues Paul Mundt
@ 2002-12-03 15:24 ` Daniel Jacobowitz
2002-12-03 15:30 ` H. J. Lu
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-12-03 15:24 UTC (permalink / raw)
To: Paul Mundt; +Cc: gdb
On Tue, Dec 03, 2002 at 06:56:20PM -0500, Paul Mundt wrote:
> Hi,
>
> I seem to be running into a bit of an odd problem. When I have a
> threaded application thats shared, everything works fine .. in the event
> that the application is statically linked however, gdb gets a SIG32 at
> pthread_create() time and doesn't track the threads properly.
Funny, no one reports this for months and this is the third report I've
seen in a week... At the bottom of this message is a workaround. I'm
not proposing it be committed, since it's obviously pretty gross. The
real issue is the concept of thread_stratum and core_stratum as
separate from process_stratum. I don't think it's appropriate - if we
are debugging a core and process at the same time this isn't how it
should work. This ties in to all the make-targets-a-real-stack thing -
I'm not entirely convinced on that score either.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Not yet submitted upstream. This requires some serious thinking about.
If the target stack worked in any logical way, this wouldn't be necessary...
ending up with roughly:
thread_stratum: thread-db (silent reference to lin-lwp)
core_stratum: corelow
exec_stratum: exec
dummy_stratum: dummy
just makes no sense.
This patch fixes debugging threaded applications which are statically linked
without breaking debugging threaded core files. It also fixes the PIDs in
generate-core-file'd corefiles. Mostly.
diff -x '*~' -ur o/gdb-5.2.debian90.cvs20021120/gdb/corelow.c gdb-5.2.debian90.cvs20021120/gdb/corelow.c
--- o/gdb-5.2.debian90.cvs20021120/gdb/corelow.c 2002-09-18 13:23:15.000000000 -0400
+++ gdb-5.2.debian90.cvs20021120/gdb/corelow.c 2002-12-03 14:03:32.000000000 -0500
@@ -350,7 +350,7 @@
bfd_map_over_sections (core_bfd, add_to_thread_list,
bfd_get_section_by_name (core_bfd, ".reg"));
- if (ontop)
+ if (ontop || 1)
{
/* Fetch all registers from core file. */
target_fetch_registers (-1);
diff -x '*~' -ur o/gdb-5.2.debian90.cvs20021120/gdb/linux-proc.c gdb-5.2.debian90.cvs20021120/gdb/linux-proc.c
--- o/gdb-5.2.debian90.cvs20021120/gdb/linux-proc.c 2002-12-03 14:13:52.000000000 -0500
+++ gdb-5.2.debian90.cvs20021120/gdb/linux-proc.c 2002-12-03 13:56:34.000000000 -0500
@@ -177,7 +177,7 @@
#ifdef FILL_FPXREGSET
gdb_fpxregset_t fpxregs;
#endif
- unsigned long merged_pid = ptid_get_tid (ptid) << 16 | ptid_get_pid (ptid);
+ unsigned long merged_pid = ptid_get_tid (ptid) << 16; /* | ptid_get_pid (ptid); */
fill_gregset (&gregs, -1);
note_data = (char *) elfcore_write_prstatus (obfd,
diff -x '*~' -ur o/gdb-5.2.debian90.cvs20021120/gdb/target.c gdb-5.2.debian90.cvs20021120/gdb/target.c
--- o/gdb-5.2.debian90.cvs20021120/gdb/target.c 2002-09-18 13:23:22.000000000 -0400
+++ gdb-5.2.debian90.cvs20021120/gdb/target.c 2002-12-03 14:06:07.000000000 -0500
@@ -1589,6 +1589,7 @@
dummy_target.to_find_memory_regions = dummy_find_memory_regions;
dummy_target.to_make_corefile_notes = dummy_make_corefile_notes;
dummy_target.to_magic = OPS_MAGIC;
+ cleanup_target (&dummy_target);
}
\f
diff -x '*~' -ur o/gdb-5.2.debian90.cvs20021120/gdb/thread-db.c gdb-5.2.debian90.cvs20021120/gdb/thread-db.c
--- o/gdb-5.2.debian90.cvs20021120/gdb/thread-db.c 2002-12-03 14:13:50.000000000 -0500
+++ gdb-5.2.debian90.cvs20021120/gdb/thread-db.c 2002-12-03 13:39:54.000000000 -0500
@@ -57,6 +57,31 @@
/* Non-zero if we're using this module's target vector. */
static int using_thread_db;
+/* Macros to pass an event to the next target if we should not be handling it
+ here in the thread_stratum. */
+#define FIND_NEXT_TARGET(METHOD_NAME) \
+ struct target_ops *next_target = &thread_db_ops; \
+ while (1) \
+ { \
+ next_target = find_target_beneath (next_target); \
+ if (next_target->METHOD_NAME != NULL) \
+ break; \
+ }
+
+#define MAYBE_HAND_DOWN(METHOD_NAME,ARGS) \
+ if (proc_handle.pid == 0) \
+ { \
+ FIND_NEXT_TARGET (METHOD_NAME); \
+ (*next_target->METHOD_NAME) ARGS; \
+ return; \
+ }
+#define MAYBE_HAND_DOWN_RETURN(METHOD_NAME,ARGS) \
+ if (proc_handle.pid == 0) \
+ { \
+ FIND_NEXT_TARGET (METHOD_NAME); \
+ return (*next_target->METHOD_NAME) ARGS; \
+ }
+
/* Non-zero if we have to keep this module's target vector active
across re-runs. */
static int keep_thread_db;
@@ -489,9 +514,7 @@
{
td_err_e err;
- /* Don't attempt to use thread_db on targets which can not run
- (core files). */
- if (objfile == NULL || !target_has_execution)
+ if (objfile == NULL)
{
/* All symbols have been discarded. If the thread_db target is
active, deactivate it now. */
@@ -515,7 +538,10 @@
/* Initialize the structure that identifies the child process. Note
that at this point there is no guarantee that we actually have a
child process. */
- proc_handle.pid = GET_PID (inferior_ptid);
+ if (target_has_execution)
+ proc_handle.pid = GET_PID (inferior_ptid);
+ else
+ proc_handle.pid = 0;
/* Now attempt to open a connection to the thread library. */
err = td_ta_new_p (&proc_handle, &thread_agent);
@@ -758,6 +784,9 @@
struct cleanup *old_chain = save_inferior_ptid ();
int xfer;
+ MAYBE_HAND_DOWN_RETURN (to_xfer_memory, (memaddr, myaddr, len, write,
+ attrib, target));
+
if (is_thread (inferior_ptid))
{
/* FIXME: This seems to be necessary to make sure breakpoints
@@ -782,6 +811,8 @@
gdb_prfpregset_t fpregset;
td_err_e err;
+ MAYBE_HAND_DOWN (to_fetch_registers, (regno));
+
if (!is_thread (inferior_ptid))
{
/* Pass the request to the target beneath us. */
@@ -819,6 +850,8 @@
gdb_prfpregset_t fpregset;
td_err_e err;
+ MAYBE_HAND_DOWN (to_store_registers, (regno));
+
if (!is_thread (inferior_ptid))
{
/* Pass the request to the target beneath us. */
@@ -908,6 +941,8 @@
td_thrinfo_t ti;
td_err_e err;
+ MAYBE_HAND_DOWN_RETURN (to_thread_alive, (ptid));
+
if (is_thread (ptid))
{
err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
@@ -961,6 +996,8 @@
{
td_err_e err;
+ MAYBE_HAND_DOWN (to_find_new_threads, ());
+
/* Iterate over all user-space threads to discover new threads. */
err = td_ta_thr_iter_p (thread_agent, find_new_threads_callback, NULL,
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
@@ -972,6 +1009,8 @@
static char *
thread_db_pid_to_str (ptid_t ptid)
{
+ MAYBE_HAND_DOWN_RETURN (to_pid_to_str, (ptid));
+
if (is_thread (ptid))
{
static char buf[64];
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 15:24 ` Daniel Jacobowitz
@ 2002-12-03 15:30 ` H. J. Lu
2002-12-03 15:43 ` Daniel Jacobowitz
2002-12-03 15:52 ` Andrew Cagney
2002-12-04 10:30 ` Paul Mundt
2 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2002-12-03 15:30 UTC (permalink / raw)
To: Paul Mundt, gdb
On Tue, Dec 03, 2002 at 06:24:57PM -0500, Daniel Jacobowitz wrote:
> On Tue, Dec 03, 2002 at 06:56:20PM -0500, Paul Mundt wrote:
> > Hi,
> >
> > I seem to be running into a bit of an odd problem. When I have a
> > threaded application thats shared, everything works fine .. in the event
> > that the application is statically linked however, gdb gets a SIG32 at
> > pthread_create() time and doesn't track the threads properly.
>
> Funny, no one reports this for months and this is the third report I've
> seen in a week... At the bottom of this message is a workaround. I'm
> not proposing it be committed, since it's obviously pretty gross. The
> real issue is the concept of thread_stratum and core_stratum as
> separate from process_stratum. I don't think it's appropriate - if we
> are debugging a core and process at the same time this isn't how it
> should work. This ties in to all the make-targets-a-real-stack thing -
> I'm not entirely convinced on that score either.
>
You can also try
ftp://ftp.linux-mips.org/pub/linux/mips/redhat/7.3/SRPMS/gdb-5.2.90-0.2.src.rpm
I tried to fix it and it seems to work for me.
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 15:30 ` H. J. Lu
@ 2002-12-03 15:43 ` Daniel Jacobowitz
2002-12-03 15:58 ` H. J. Lu
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-12-03 15:43 UTC (permalink / raw)
To: H. J. Lu; +Cc: Paul Mundt, gdb
On Tue, Dec 03, 2002 at 03:30:51PM -0800, H. J. Lu wrote:
> On Tue, Dec 03, 2002 at 06:24:57PM -0500, Daniel Jacobowitz wrote:
> > On Tue, Dec 03, 2002 at 06:56:20PM -0500, Paul Mundt wrote:
> > > Hi,
> > >
> > > I seem to be running into a bit of an odd problem. When I have a
> > > threaded application thats shared, everything works fine .. in the event
> > > that the application is statically linked however, gdb gets a SIG32 at
> > > pthread_create() time and doesn't track the threads properly.
> >
> > Funny, no one reports this for months and this is the third report I've
> > seen in a week... At the bottom of this message is a workaround. I'm
> > not proposing it be committed, since it's obviously pretty gross. The
> > real issue is the concept of thread_stratum and core_stratum as
> > separate from process_stratum. I don't think it's appropriate - if we
> > are debugging a core and process at the same time this isn't how it
> > should work. This ties in to all the make-targets-a-real-stack thing -
> > I'm not entirely convinced on that score either.
> >
>
> You can also try
>
> ftp://ftp.linux-mips.org/pub/linux/mips/redhat/7.3/SRPMS/gdb-5.2.90-0.2.src.rpm
>
> I tried to fix it and it seems to work for me.
FTP's still down. Mind posting the patch?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 15:24 ` Daniel Jacobowitz
2002-12-03 15:30 ` H. J. Lu
@ 2002-12-03 15:52 ` Andrew Cagney
2002-12-03 15:58 ` Daniel Jacobowitz
2002-12-04 10:30 ` Paul Mundt
2 siblings, 1 reply; 10+ messages in thread
From: Andrew Cagney @ 2002-12-03 15:52 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Paul Mundt, gdb
>
> Funny, no one reports this for months and this is the third report I've
> seen in a week... At the bottom of this message is a workaround. I'm
> not proposing it be committed, since it's obviously pretty gross. The
> real issue is the concept of thread_stratum and core_stratum as
> separate from process_stratum. I don't think it's appropriate - if we
> are debugging a core and process at the same time this isn't how it
> should work. This ties in to all the make-targets-a-real-stack thing -
> I'm not entirely convinced on that score either.
GDB Speak :-) `An inferior stack', separate to the stratum. Having
implemented the idea, I'm pretty much convinced it's the correct
approach (although, as you demonstrate, not absolutly necessary).
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 15:43 ` Daniel Jacobowitz
@ 2002-12-03 15:58 ` H. J. Lu
0 siblings, 0 replies; 10+ messages in thread
From: H. J. Lu @ 2002-12-03 15:58 UTC (permalink / raw)
To: Paul Mundt, gdb
On Tue, Dec 03, 2002 at 06:43:25PM -0500, Daniel Jacobowitz wrote:
> On Tue, Dec 03, 2002 at 03:30:51PM -0800, H. J. Lu wrote:
> > On Tue, Dec 03, 2002 at 06:24:57PM -0500, Daniel Jacobowitz wrote:
> > > On Tue, Dec 03, 2002 at 06:56:20PM -0500, Paul Mundt wrote:
> > > > Hi,
> > > >
> > > > I seem to be running into a bit of an odd problem. When I have a
> > > > threaded application thats shared, everything works fine .. in the event
> > > > that the application is statically linked however, gdb gets a SIG32 at
> > > > pthread_create() time and doesn't track the threads properly.
> > >
> > > Funny, no one reports this for months and this is the third report I've
> > > seen in a week... At the bottom of this message is a workaround. I'm
> > > not proposing it be committed, since it's obviously pretty gross. The
> > > real issue is the concept of thread_stratum and core_stratum as
> > > separate from process_stratum. I don't think it's appropriate - if we
> > > are debugging a core and process at the same time this isn't how it
> > > should work. This ties in to all the make-targets-a-real-stack thing -
> > > I'm not entirely convinced on that score either.
> > >
> >
> > You can also try
> >
> > ftp://ftp.linux-mips.org/pub/linux/mips/redhat/7.3/SRPMS/gdb-5.2.90-0.2.src.rpm
> >
> > I tried to fix it and it seems to work for me.
>
> FTP's still down. Mind posting the patch?
That is a very old patch:
http://sources.redhat.com/ml/gdb-patches/2002-03/msg00197.html
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 15:52 ` Andrew Cagney
@ 2002-12-03 15:58 ` Daniel Jacobowitz
2002-12-03 16:09 ` H. J. Lu
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-12-03 15:58 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Paul Mundt, gdb
On Tue, Dec 03, 2002 at 06:52:30PM -0500, Andrew Cagney wrote:
> >
> >Funny, no one reports this for months and this is the third report I've
> >seen in a week... At the bottom of this message is a workaround. I'm
> >not proposing it be committed, since it's obviously pretty gross. The
> >real issue is the concept of thread_stratum and core_stratum as
> >separate from process_stratum. I don't think it's appropriate - if we
> >are debugging a core and process at the same time this isn't how it
> >should work. This ties in to all the make-targets-a-real-stack thing -
> >I'm not entirely convinced on that score either.
>
> GDB Speak :-) `An inferior stack', separate to the stratum. Having
> implemented the idea, I'm pretty much convinced it's the correct
> approach (although, as you demonstrate, not absolutly necessary).
Hrm, interesting. A stack doesn't seem logical for that, just support
for multiple targets... pull one out when you want it. That could be
adapted to solve this problem. Let's see the code :)
===
HJ, I'm pretty sure your patch won't work right in this case:
# gdb static-app corefile
(gdb) run
There will be no new call to the objfile hook, and no new pushes, and
thread-db won't load.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 15:58 ` Daniel Jacobowitz
@ 2002-12-03 16:09 ` H. J. Lu
0 siblings, 0 replies; 10+ messages in thread
From: H. J. Lu @ 2002-12-03 16:09 UTC (permalink / raw)
To: Andrew Cagney, Paul Mundt, gdb
On Tue, Dec 03, 2002 at 06:58:33PM -0500, Daniel Jacobowitz wrote:
> On Tue, Dec 03, 2002 at 06:52:30PM -0500, Andrew Cagney wrote:
> > >
> > >Funny, no one reports this for months and this is the third report I've
> > >seen in a week... At the bottom of this message is a workaround. I'm
> > >not proposing it be committed, since it's obviously pretty gross. The
> > >real issue is the concept of thread_stratum and core_stratum as
> > >separate from process_stratum. I don't think it's appropriate - if we
> > >are debugging a core and process at the same time this isn't how it
> > >should work. This ties in to all the make-targets-a-real-stack thing -
> > >I'm not entirely convinced on that score either.
> >
> > GDB Speak :-) `An inferior stack', separate to the stratum. Having
> > implemented the idea, I'm pretty much convinced it's the correct
> > approach (although, as you demonstrate, not absolutly necessary).
>
> Hrm, interesting. A stack doesn't seem logical for that, just support
> for multiple targets... pull one out when you want it. That could be
> adapted to solve this problem. Let's see the code :)
>
>
> ===
>
>
> HJ, I'm pretty sure your patch won't work right in this case:
>
> # gdb static-app corefile
> (gdb) run
>
> There will be no new call to the objfile hook, and no new pushes, and
> thread-db won't load.
>
No, it is not perfect.
H.J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-03 15:24 ` Daniel Jacobowitz
2002-12-03 15:30 ` H. J. Lu
2002-12-03 15:52 ` Andrew Cagney
@ 2002-12-04 10:30 ` Paul Mundt
2002-12-04 10:44 ` Daniel Jacobowitz
2 siblings, 1 reply; 10+ messages in thread
From: Paul Mundt @ 2002-12-04 10:30 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
[-- Attachment #1: Type: text/plain, Size: 39417 bytes --]
Hi,
On Tue, 2002-12-03 at 18:24, Daniel Jacobowitz wrote:
> Funny, no one reports this for months and this is the third report I've
> seen in a week... At the bottom of this message is a workaround. I'm
> not proposing it be committed, since it's obviously pretty gross. The
> real issue is the concept of thread_stratum and core_stratum as
> separate from process_stratum. I don't think it's appropriate - if we
> are debugging a core and process at the same time this isn't how it
> should work. This ties in to all the make-targets-a-real-stack thing -
> I'm not entirely convinced on that score either.
Okay, making progress. This takes care of the SIG32/SIGTRAP issues,
though now it looks like PPC is stuck on SIG33 issues.
Running the same test-case from yesterday, if I run the shared version
twice in a row, gdb segfaults. If I run the shared or static version of
the app under gdb under gdb, I get SIG33 (which occurs in different
locations per-thread if its static).
For shared, I see the following:
bash-2.05# ./gdb
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "powerpc-linux".
(gdb) set prompt (top-gdb)
(top-gdb) set verbose
(top-gdb) file ./gdb
Reading symbols from ./gdb...done.
(top-gdb) run
Starting program: /home/root/gdb
Reading symbols from /usr/lib/libncurses.so.5...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld.so.1...done.
Reading in symbols for dl-debug.c... and rtld.c... and
../sysdeps/generic/dl-cache.c... and dl-init.c...done.
Reading symbols from /lib/libthread_db.so.1...done.
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "powerpc-linux".
(gdb) set verbose
(gdb) file ./test-static
Reading symbols from ./test-static...done.
(gdb) run
Starting program: /home/root/test-static
Reading in symbols for soinit.c...done.
[New Thread 1024 (LWP 729)]
Enter the number of threads reqd(<=1024): 2
Starting thread 0
[New Thread 2049 (LWP 730)]
Reading in symbols for events.c... and init.c... and join.c... and
signals.c... and errno.c... and manager.c... and specific.c... and
pthread.c...done.
[New Thread 1026 (LWP 731)]
Starting real thread 0
created thread 0
Starting thread 1
[New Thread 2051 (LWP 732)]
Ending thread
Starting real thread 1
created thread 1
Reading in symbols for ../../package/gdb/lin-lwp.c... and
../../package/gdb/main.c... and init.c... and
../../package/gdb/values.c... and
../../package/gdb/source.c... and ../../package/gdb/infrun.c... and
../../package/gdb/valops.c... and ../../package/gdb/eval.c... and
../../package/gdb/symfile.c... and ../../package/gdb/printcmd.c... and
../../package/gdb/valprint.c...done.
Program received signal SIG33, Real-time event 33.
sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
1450 ../../package/gdb/lin-lwp.c: No such file or directory.
in ../../package/gdb/lin-lwp.c
(top-gdb) Ending thread
(top-gdb) bt
Reading in symbols for ../sysdeps/unix/sysv/linux/sigsuspend.c... and
../sysdeps/unix/sysv/linux/powerpc/sysdep.c... and
../sysdeps/unix/sysv/linux/init-first.c... and
../sysdeps/powerpc/elf/libc-start.c... and
../sysdeps/generic/sigjmp.c... and iconv.c... and iconv_open.c...
and ../sysdeps/unix/sysv/linux/signal.c... and
../sysdeps/posix/raise.c... and
../sysdeps/unix/sysv/linux/sigprocmask.c...done.
Reading in symbols for ../../package/gdb/thread-db.c... and
../../package/gdb/solib-legacy.c... and
../../package/gdb/rs6000-tdep.c... and
../../package/gdb/gdbarch.c... and ../../package/gdb/proc-service.c...
and ../../package/gdb/core-regset.c... and ../../package/gdb/remote.c...
and
../../package/gdb/inf-loop.c... and ../../package/gdb/infcmd.c... and
../../package/gdb/linux-proc.c... and ../../package/gdb/utils.c... and
../../package/gdb/event-top.c... and
../../package/gdb/linespec.c...done.
Reading in symbols for ../../package/gdb/inftarg.c...done.
Reading in symbols for ../../package/gdb/cli/cli-decode.c... and
../../package/gdb/top.c... and ../../package/gdb/symtab.c... and
../../package/gdb/arch-utils.c... and ../../package/gdb/gcore.c...done.
Reading in symbols for ../../package/readline/callback.c... and
../../package/readline/readline.c... and targ-map.c... and
../../package/gdb/stack.c... and
../../../package/sim/ppc/sim_calls.c... and
../../../package/sim/ppc/../common/callback.c... and
../../package/gdb/infptrace.c... and
../../package/gdb/inflow.c... and
../../../package/sim/ppc/psim.c...done.
Reading in symbols for ../../package/gdb/event-loop.c...done.
#0 sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
#1 <signal handler called>
#2 0x0fdbf3b4 in __syscall_rt_sigsuspend () from /lib/libc.so.6
#3 0x0fdbdffc in __sigsuspend (set=0x103d81fc) at
../sysdeps/unix/sysv/linux/sigsuspend.c:54
#4 0x1009b02c in lin_lwp_wait (ptid={pid = -1, lwp = 0, tid = 0},
ourstatus=0x7ffff128) at ../../package/gdb/lin-lwp.c:1183
#5 0x100ee000 in thread_db_wait (ptid={pid = 2147479840, lwp =
269410304, tid = -1}, ourstatus=0x7ffff128) at
../../package/gdb/thread-db.c:751
#6 0x1007540c in wait_for_inferior () at
../../package/gdb/infrun.c:1238
#7 0x10075194 in proceed (addr=1, siggnal=TARGET_SIGNAL_0, step=0) at
../../package/gdb/infrun.c:1037
#8 0x100e872c in child_create_inferior (exec_file=0xfffffffc <Address
0xfffffffc out of bounds>, allargs=0x8 <Address 0x8 out of bounds>,
env=0x1)
at ../../package/gdb/inftarg.c:474
#9 0x1009b664 in lin_lwp_create_inferior (exec_file=0xfffffffc <Address
0xfffffffc out of bounds>, allargs=0x8 <Address 0x8 out of bounds>,
env=0x1)
at ../../package/gdb/lin-lwp.c:1330
#10 0x100ee8e0 in thread_db_create_inferior (exec_file=0x10412b78
"/home/root/test-static", allargs=0x104e0510 "", env=0x103f8330)
at ../../package/gdb/thread-db.c:901
#11 0x10071884 in run_command (args=0x0, from_tty=273548560) at
../../package/gdb/infcmd.c:463
#12 0x1013d9ac in do_cfunc (c=0xfffffffc, args=0x8 <Address 0x8 out of
bounds>, from_tty=1) at ../../package/gdb/cli/cli-decode.c:50
#13 0x100c9940 in execute_command (p=0x103ee1d3 "", from_tty=1) at
../../package/gdb/top.c:715
#14 0x100817bc in command_handler (command=0x103ee1d0 "") at
../../package/gdb/event-top.c:504
#15 0x10081f68 in command_line_handler (rl=0x103d68e8 "") at
../../package/gdb/event-top.c:802
#16 0x102f3008 in rl_callback_read_char () at
../../package/readline/callback.c:114
#17 0x10080b08 in rl_callback_read_char_wrapper (client_data=0xfffffffc)
at ../../package/gdb/event-top.c:168
#18 0x10081624 in stdin_event_handler (error=-4, client_data=0xfffffffc)
at ../../package/gdb/event-top.c:418
#19 0x100e4158 in handle_file_event (event_file_desc=-4) at
../../package/gdb/event-loop.c:714
#20 0x100e39b4 in process_event () at ../../package/gdb/event-loop.c:335
#21 0x100e3a0c in gdb_do_one_event (data=0xfffffffc) at
../../package/gdb/event-loop.c:372
#22 0x100c9424 in do_catch_errors (uiout=Reading in symbols for
../../package/gdb/ui-out.c...done.
0xfffffffc, data=0x8) at ../../package/gdb/top.c:491
#23 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff6c8, func_val=0x7ffff6d0,
func_caught=0x7ffff6d4,
errstring=0x1059a350 "", mask=6) at ../../package/gdb/top.c:423
#24 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1059a350 "", mask=272564224) at ../../package/gdb/top.c:503
#25 0x100e3a74 in start_event_loop () at
../../package/gdb/event-loop.c:416
#26 0x10080c24 in cli_command_loop () at
../../package/gdb/event-top.c:200
#27 0x100465b4 in captured_command_loop (data=0xfffffffc) at
../../package/gdb/main.c:94
#28 0x100c9424 in do_catch_errors (uiout=0xfffffffc, data=0x8) at
../../package/gdb/top.c:491
#29 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff968, func_val=0x7ffff970,
func_caught=0x7ffff974,
errstring=0x1059a350 "", mask=6) at ../../package/gdb/top.c:423
#30 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1059a350 "", mask=272564224) at ../../package/gdb/top.c:503
#31 0x10047100 in captured_main (data=0xfffffffc) at
../../package/gdb/main.c:723
#32 0x100c9424 in do_catch_errors (uiout=0xfffffffc, data=0x8) at
../../package/gdb/top.c:491
#33 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x103ade60, func_args=0x7ffffd38, func_val=0x7ffffd40,
func_caught=0x7ffffd44,
errstring=0x1059a350 "", mask=6) at ../../package/gdb/top.c:423
#34 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1059a350 "", mask=272564224) at ../../package/gdb/top.c:503
#35 0x10047134 in main (argc=-4, argv=0x8) at
../../package/gdb/main.c:734
#36 0x0fda9e74 in __libc_start_main (argc=1, ubp_av=0x7ffffdc4,
ubp_ev=0x1, auxvec=0x7ffffe0c, rtld_fini=0xfffffffc, stinfo=0x10047104,
stack_on_entry=0xfdbdfe8) at ../sysdeps/powerpc/elf/libc-start.c:119
(top-gdb) c
Continuing.
Program received signal SIG33, Real-time event 33.
sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
1450 in ../../package/gdb/lin-lwp.c
(top-gdb) c
Continuing.
Program exited with code 02.
(gdb) run
Starting program: /home/root/test-static
[New Thread 1024 (LWP 733)]
Enter the number of threads reqd(<=1024): 2
Starting thread 0
[New Thread 2049 (LWP 734)]
[New Thread 1026 (LWP 735)]
Starting real thread 0
created thread 0
Starting thread 1
[New Thread 2051 (LWP 736)]
Ending thread
Program received signal SIG33, Real-time event 33.
0x0fe59d44 in __syscall_ptrace () from /lib/libc.so.6
(top-gdb) bt
Reading in symbols for ../sysdeps/unix/sysv/linux/ptrace.c... and
vfprintf.c... and strfmon.c... and gconv_trans.c... and
gconv_simple.c... and gconv_open.c...
and gconv_conf.c... and gconv_db.c... and gconv_builtin.c... and
gconv_close.c... and gconv.c... and setlocale.c... and version.c... and
lc-time.c... and
duplocale.c... and mb_cur_max.c... and localeconv.c... and
findlocale.c... and ../sysdeps/generic/abort.c... and
../sysdeps/unix/sysv/linux/sigaction.c... and
../sysdeps/generic/check_fds.c... and
../sysdeps/unix/sysv/linux/sigqueue.c... and
../sysdeps/posix/cuserid.c... and ../sysdeps/posix/ctermid.c... and
bindtextdom.c... and assert.c... and ../sysdeps/generic/getenv.c... and
_itoa.c... and strtof.c... and erand48_r.c... and ctype-info.c... and
lc-ctype.c...
and ../sysdeps/ieee754/dbl-64/s_isinf.c... and
../sysdeps/generic/strtol.c...done.
#0 0x0fe59d44 in __syscall_ptrace () from /lib/libc.so.6
#1 0x0fe53ab4 in ptrace (request=PTRACE_CONT) at
../sysdeps/unix/sysv/linux/ptrace.c:107
#2 0x100e7a4c in child_resume (ptid=Cannot access memory at address 0x0
) at ../../package/gdb/infptrace.c:270
#3 0x100997a8 in resume_callback (lp=0x104bc380, data=0x2df) at
../../package/gdb/lin-lwp.c:553
#4 0x10098b44 in iterate_over_lwps (callback=0x1009973c
<resume_callback>, data=0x0) at ../../package/gdb/lin-lwp.c:288
#5 0x10099990 in lin_lwp_resume (ptid={pid = 734, lwp = 0, tid = 0},
step=0, signo=TARGET_SIGNAL_0) at ../../package/gdb/lin-lwp.c:624
#6 0x100edcd4 in thread_db_resume (ptid={pid = 2147479552, lwp =
269409492, tid = 734}, step=0, signo=TARGET_SIGNAL_0) at
../../package/gdb/thread-db.c:668
#7 0x10074ef8 in resume (step=0, sig=TARGET_SIGNAL_0) at
../../package/gdb/infrun.c:889
#8 0x10077be0 in keep_going (ecs=0x7ffff128) at
../../package/gdb/infrun.c:3226
#9 0x1007735c in handle_inferior_event (ecs=0x7ffff128) at
../../package/gdb/infrun.c:2870
#10 0x1007542c in wait_for_inferior () at
../../package/gdb/infrun.c:1241
#11 0x10075194 in proceed (addr=1, siggnal=TARGET_SIGNAL_0, step=0) at
../../package/gdb/infrun.c:1037
#12 0x100e872c in child_create_inferior (exec_file=0x0, allargs=0x2df
<Address 0x2df out of bounds>, env=0x1) at
../../package/gdb/inftarg.c:474
#13 0x1009b664 in lin_lwp_create_inferior (exec_file=0x0, allargs=0x2df
<Address 0x2df out of bounds>, env=0x1) at
../../package/gdb/lin-lwp.c:1330
#14 0x100ee8e0 in thread_db_create_inferior (exec_file=0x10412b78
"/home/root/test-static", allargs=0x104e0510 "", env=0x103f8330)
at ../../package/gdb/thread-db.c:901
#15 0x10071884 in run_command (args=0x0, from_tty=273548560) at
../../package/gdb/infcmd.c:463
#16 0x1013d9ac in do_cfunc (c=0x0, args=0x2df <Address 0x2df out of
bounds>, from_tty=1) at ../../package/gdb/cli/cli-decode.c:50
#17 0x100c9940 in execute_command (p=0x103ee1d3 "", from_tty=1) at
../../package/gdb/top.c:715
#18 0x100817bc in command_handler (command=0x103ee1d0 "") at
../../package/gdb/event-top.c:504
#19 0x10081f68 in command_line_handler (rl=0x103d68e8 "") at
../../package/gdb/event-top.c:802
#20 0x102f3008 in rl_callback_read_char () at
../../package/readline/callback.c:114
#21 0x10080b08 in rl_callback_read_char_wrapper (client_data=0x0) at
../../package/gdb/event-top.c:168
#22 0x10081624 in stdin_event_handler (error=0, client_data=0x0) at
../../package/gdb/event-top.c:418
#23 0x100e4158 in handle_file_event (event_file_desc=0) at
../../package/gdb/event-loop.c:714
#24 0x100e39b4 in process_event () at ../../package/gdb/event-loop.c:335
#25 0x100e3a0c in gdb_do_one_event (data=0x0) at
../../package/gdb/event-loop.c:372
#26 0x100c9424 in do_catch_errors (uiout=0x0, data=0x2df) at
../../package/gdb/top.c:491
#27 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff6c8, func_val=0x7ffff6d0,
func_caught=0x7ffff6d4,
errstring=0x0, mask=6) at ../../package/gdb/top.c:423
#28 0x100c9470 in catch_errors (func=0, func_args=0x2df, errstring=0x0,
mask=4) at ../../package/gdb/top.c:503
#29 0x100e3a74 in start_event_loop () at
../../package/gdb/event-loop.c:416
#30 0x10080c24 in cli_command_loop () at
../../package/gdb/event-top.c:200
#31 0x100465b4 in captured_command_loop (data=0x0) at
../../package/gdb/main.c:94
#32 0x100c9424 in do_catch_errors (uiout=0x0, data=0x2df) at
../../package/gdb/top.c:491
#33 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff968, func_val=0x7ffff970,
func_caught=0x7ffff974,
errstring=0x0, mask=6) at ../../package/gdb/top.c:423
#34 0x100c9470 in catch_errors (func=0, func_args=0x2df, errstring=0x0,
mask=4) at ../../package/gdb/top.c:503
#35 0x10047100 in captured_main (data=0x0) at
../../package/gdb/main.c:723
#36 0x100c9424 in do_catch_errors (uiout=0x0, data=0x2df) at
../../package/gdb/top.c:491
#37 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x103ade60, func_args=0x7ffffd38, func_val=0x7ffffd40,
func_caught=0x7ffffd44,
errstring=0x0, mask=6) at ../../package/gdb/top.c:423
#38 0x100c9470 in catch_errors (func=0, func_args=0x2df, errstring=0x0,
mask=4) at ../../package/gdb/top.c:503
#39 0x10047134 in main (argc=0, argv=0x2df) at
../../package/gdb/main.c:734
#40 0x0fda9e74 in __libc_start_main (argc=1, ubp_av=0x7ffffdc4,
ubp_ev=0x1, auxvec=0x7ffffe0c, rtld_fini=0, stinfo=0x10047104,
stack_on_entry=0xc)
at ../sysdeps/powerpc/elf/libc-start.c:119
(top-gdb) c
Continuing.
Starting real thread 1
created thread 1
Ending thread
Program received signal SIG33, Real-time event 33.
sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
1450 in ../../package/gdb/lin-lwp.c
(top-gdb) c
Continuing.
Program exited with code 02.
(gdb) quit
Program exited normally.
(top-gdb) quit
and for static, the segfault is avoided, but SIG33 still happens:
bash-2.05# ./gdb
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "powerpc-linux".
(gdb) set prompt (top-gdb)
(top-gdb) set verbose
(top-gdb) file ./gdb
Reading symbols from ./gdb...done.
(top-gdb) run
Starting program: /home/root/gdb
Reading symbols from /usr/lib/libncurses.so.5...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld.so.1...done.
Reading in symbols for dl-debug.c... and rtld.c... and
../sysdeps/generic/dl-cache.c... and dl-init.c...done.
Reading symbols from /lib/libthread_db.so.1...done.
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "powerpc-linux".
(gdb) set verbose
(gdb) file ./test-shared
Reading symbols from ./test-shared...done.
(gdb) run
Starting program: /home/root/test-shared
Reading in symbols for soinit.c...done.
Reading symbols from /lib/libpthread.so.0...done.
[New Thread 1024 (LWP 715)]
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld.so.1...done.
Reading in symbols for dl-debug.c... and rtld.c... and
../sysdeps/generic/dl-cache.c... and dl-init.c...done.
Enter the number of threads reqd(<=1024): 2
Starting thread 0
[New Thread 2049 (LWP 716)]
Reading in symbols for events.c... and attr.c... and join.c... and
cancel.c...done.
[New Thread 1026 (LWP 717)]
Starting real thread 0
created thread 0
Starting thread 1
[New Thread 2051 (LWP 718)]
Ending thread
Starting real thread 1
created thread 1
Reading in symbols for ../../package/gdb/lin-lwp.c... and
../../package/gdb/main.c... and init.c... and
../../package/gdb/values.c... and
../../package/gdb/source.c... and ../../package/gdb/infrun.c... and
../../package/gdb/valops.c... and ../../package/gdb/eval.c... and
../../package/gdb/symfile.c... and ../../package/gdb/printcmd.c... and
../../package/gdb/valprint.c...done.
Program received signal SIG33, Real-time event 33.
sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
1450 ../../package/gdb/lin-lwp.c: No such file or directory.
in ../../package/gdb/lin-lwp.c
(top-gdb) Ending thread
(top-gdb) bt
Reading in symbols for ../sysdeps/unix/sysv/linux/sigsuspend.c... and
../sysdeps/unix/sysv/linux/powerpc/sysdep.c... and
../sysdeps/unix/sysv/linux/init-first.c... and
../sysdeps/powerpc/elf/libc-start.c... and
../sysdeps/generic/sigjmp.c... and iconv.c... and iconv_open.c...
and ../sysdeps/unix/sysv/linux/signal.c... and
../sysdeps/posix/raise.c... and
../sysdeps/unix/sysv/linux/sigprocmask.c...done.
Reading in symbols for ../../package/gdb/thread-db.c... and
../../package/gdb/solib-legacy.c... and
../../package/gdb/rs6000-tdep.c... and
../../package/gdb/gdbarch.c... and ../../package/gdb/proc-service.c...
and ../../package/gdb/core-regset.c... and ../../package/gdb/remote.c...
and
../../package/gdb/inf-loop.c... and ../../package/gdb/infcmd.c... and
../../package/gdb/linux-proc.c... and ../../package/gdb/utils.c... and
../../package/gdb/event-top.c... and
../../package/gdb/linespec.c...done.
Reading in symbols for ../../package/gdb/inftarg.c...done.
Reading in symbols for ../../package/gdb/target.c...done.
Reading in symbols for ../../package/gdb/cli/cli-decode.c... and
../../package/gdb/top.c... and ../../package/gdb/symtab.c... and
../../package/gdb/arch-utils.c... and ../../package/gdb/gcore.c...done.
Reading in symbols for ../../package/readline/callback.c... and
../../package/readline/readline.c... and targ-map.c... and
../../package/gdb/stack.c... and
../../../package/sim/ppc/sim_calls.c... and
../../../package/sim/ppc/../common/callback.c... and
../../package/gdb/infptrace.c... and
../../package/gdb/inflow.c... and
../../../package/sim/ppc/psim.c...done.
Reading in symbols for ../../package/gdb/event-loop.c...done.
#0 sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
#1 <signal handler called>
#2 0x0fdbf3b4 in __syscall_rt_sigsuspend () from /lib/libc.so.6
#3 0x0fdbdffc in __sigsuspend (set=0x103d81fc) at
../sysdeps/unix/sysv/linux/sigsuspend.c:54
#4 0x1009b02c in lin_lwp_wait (ptid={pid = -1, lwp = 0, tid = 0},
ourstatus=0x7ffff138) at ../../package/gdb/lin-lwp.c:1183
#5 0x100ee000 in thread_db_wait (ptid={pid = 2147479856, lwp =
269410304, tid = -1}, ourstatus=0x7ffff138) at
../../package/gdb/thread-db.c:751
#6 0x1007540c in wait_for_inferior () at
../../package/gdb/infrun.c:1238
#7 0x10075194 in proceed (addr=0, siggnal=TARGET_SIGNAL_0, step=0) at
../../package/gdb/infrun.c:1037
#8 0x100e872c in child_create_inferior (exec_file=0xfffffffc <Address
0xfffffffc out of bounds>, allargs=0x8 <Address 0x8 out of bounds>,
env=0x1)
at ../../package/gdb/inftarg.c:474
#9 0x100a98c4 in find_default_create_inferior (exec_file=0x10412b78
"/home/root/test-shared", allargs=0x10425720 "", env=0x103f8330)
at ../../package/gdb/target.c:1216
#10 0x10071884 in run_command (args=0x0, from_tty=272783136) at
../../package/gdb/infcmd.c:463
#11 0x1013d9ac in do_cfunc (c=0xfffffffc, args=0x8 <Address 0x8 out of
bounds>, from_tty=1) at ../../package/gdb/cli/cli-decode.c:50
#12 0x100c9940 in execute_command (p=0x103ee1d3 "", from_tty=1) at
../../package/gdb/top.c:715
#13 0x100817bc in command_handler (command=0x103ee1d0 "") at
../../package/gdb/event-top.c:504
#14 0x10081f68 in command_line_handler (rl=0x103d68e8 "") at
../../package/gdb/event-top.c:802
#15 0x102f3008 in rl_callback_read_char () at
../../package/readline/callback.c:114
#16 0x10080b08 in rl_callback_read_char_wrapper (client_data=0xfffffffc)
at ../../package/gdb/event-top.c:168
#17 0x10081624 in stdin_event_handler (error=-4, client_data=0xfffffffc)
at ../../package/gdb/event-top.c:418
#18 0x100e4158 in handle_file_event (event_file_desc=-4) at
../../package/gdb/event-loop.c:714
#19 0x100e39b4 in process_event () at ../../package/gdb/event-loop.c:335
#20 0x100e3a0c in gdb_do_one_event (data=0xfffffffc) at
../../package/gdb/event-loop.c:372
#21 0x100c9424 in do_catch_errors (uiout=Reading in symbols for
../../package/gdb/ui-out.c...done.
0xfffffffc, data=0x8) at ../../package/gdb/top.c:491
#22 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff6c8, func_val=0x7ffff6d0,
func_caught=0x7ffff6d4,
errstring=0x1076f0d0 "", mask=6) at ../../package/gdb/top.c:423
#23 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1076f0d0 "", mask=272564224) at ../../package/gdb/top.c:503
#24 0x100e3a74 in start_event_loop () at
../../package/gdb/event-loop.c:416
#25 0x10080c24 in cli_command_loop () at
../../package/gdb/event-top.c:200
#26 0x100465b4 in captured_command_loop (data=0xfffffffc) at
../../package/gdb/main.c:94
#27 0x100c9424 in do_catch_errors (uiout=0xfffffffc, data=0x8) at
../../package/gdb/top.c:491
#28 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff968, func_val=0x7ffff970,
func_caught=0x7ffff974,
errstring=0x1076f0d0 "", mask=6) at ../../package/gdb/top.c:423
#29 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1076f0d0 "", mask=272564224) at ../../package/gdb/top.c:503
#30 0x10047100 in captured_main (data=0xfffffffc) at
../../package/gdb/main.c:723
#31 0x100c9424 in do_catch_errors (uiout=0xfffffffc, data=0x8) at
../../package/gdb/top.c:491
#32 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x103ade60, func_args=0x7ffffd38, func_val=0x7ffffd40,
func_caught=0x7ffffd44,
errstring=0x1076f0d0 "", mask=6) at ../../package/gdb/top.c:423
#33 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1076f0d0 "", mask=272564224) at ../../package/gdb/top.c:503
#34 0x10047134 in main (argc=-4, argv=0x8) at
../../package/gdb/main.c:734
#35 0x0fda9e74 in __libc_start_main (argc=1, ubp_av=0x7ffffdc4,
ubp_ev=0x1, auxvec=0x7ffffe0c, rtld_fini=0xfffffffc, stinfo=0x10047104,
stack_on_entry=0xfdbdfe8) at ../sysdeps/powerpc/elf/libc-start.c:119
(top-gdb) c
Continuing.
Program received signal SIG33, Real-time event 33.
sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
1450 in ../../package/gdb/lin-lwp.c
(top-gdb) bt
#0 sigchld_handler (signo=17) at ../../package/gdb/lin-lwp.c:1450
#1 <signal handler called>
#2 0x0fdbf3b4 in __syscall_rt_sigsuspend () from /lib/libc.so.6
#3 0x0fdbdffc in __sigsuspend (set=0x103d81fc) at
../sysdeps/unix/sysv/linux/sigsuspend.c:54
#4 0x1009b02c in lin_lwp_wait (ptid={pid = -1, lwp = 0, tid = 0},
ourstatus=0x7ffff138) at ../../package/gdb/lin-lwp.c:1183
#5 0x100ee000 in thread_db_wait (ptid={pid = 2147479856, lwp =
269410304, tid = -1}, ourstatus=0x7ffff138) at
../../package/gdb/thread-db.c:751
#6 0x1007540c in wait_for_inferior () at
../../package/gdb/infrun.c:1238
#7 0x10075194 in proceed (addr=0, siggnal=TARGET_SIGNAL_0, step=0) at
../../package/gdb/infrun.c:1037
#8 0x100e872c in child_create_inferior (exec_file=0xfffffffc <Address
0xfffffffc out of bounds>, allargs=0x8 <Address 0x8 out of bounds>,
env=0x1)
at ../../package/gdb/inftarg.c:474
#9 0x100a98c4 in find_default_create_inferior (exec_file=0x10412b78
"/home/root/test-shared", allargs=0x10425720 "", env=0x103f8330)
at ../../package/gdb/target.c:1216
#10 0x10071884 in run_command (args=0x0, from_tty=272783136) at
../../package/gdb/infcmd.c:463
#11 0x1013d9ac in do_cfunc (c=0xfffffffc, args=0x8 <Address 0x8 out of
bounds>, from_tty=1) at ../../package/gdb/cli/cli-decode.c:50
#12 0x100c9940 in execute_command (p=0x103ee1d3 "", from_tty=1) at
../../package/gdb/top.c:715
#13 0x100817bc in command_handler (command=0x103ee1d0 "") at
../../package/gdb/event-top.c:504
#14 0x10081f68 in command_line_handler (rl=0x103d68e8 "") at
../../package/gdb/event-top.c:802
#15 0x102f3008 in rl_callback_read_char () at
../../package/readline/callback.c:114
#16 0x10080b08 in rl_callback_read_char_wrapper (client_data=0xfffffffc)
at ../../package/gdb/event-top.c:168
#17 0x10081624 in stdin_event_handler (error=-4, client_data=0xfffffffc)
at ../../package/gdb/event-top.c:418
#18 0x100e4158 in handle_file_event (event_file_desc=-4) at
../../package/gdb/event-loop.c:714
#19 0x100e39b4 in process_event () at ../../package/gdb/event-loop.c:335
#20 0x100e3a0c in gdb_do_one_event (data=0xfffffffc) at
../../package/gdb/event-loop.c:372
#21 0x100c9424 in do_catch_errors (uiout=0xfffffffc, data=0x8) at
../../package/gdb/top.c:491
#22 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff6c8, func_val=0x7ffff6d0,
func_caught=0x7ffff6d4,
errstring=0x1076f0d0 "", mask=6) at ../../package/gdb/top.c:423
#23 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1076f0d0 "", mask=272564224) at ../../package/gdb/top.c:503
#24 0x100e3a74 in start_event_loop () at
../../package/gdb/event-loop.c:416
#25 0x10080c24 in cli_command_loop () at
../../package/gdb/event-top.c:200
#26 0x100465b4 in captured_command_loop (data=0xfffffffc) at
../../package/gdb/main.c:94
#27 0x100c9424 in do_catch_errors (uiout=0xfffffffc, data=0x8) at
../../package/gdb/top.c:491
#28 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff968, func_val=0x7ffff970,
func_caught=0x7ffff974,
errstring=0x1076f0d0 "", mask=6) at ../../package/gdb/top.c:423
#29 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1076f0d0 "", mask=272564224) at ../../package/gdb/top.c:503
#30 0x10047100 in captured_main (data=0xfffffffc) at
../../package/gdb/main.c:723
#31 0x100c9424 in do_catch_errors (uiout=0xfffffffc, data=0x8) at
../../package/gdb/top.c:491
#32 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x103ade60, func_args=0x7ffffd38, func_val=0x7ffffd40,
func_caught=0x7ffffd44,
errstring=0x1076f0d0 "", mask=6) at ../../package/gdb/top.c:423
#33 0x100c9470 in catch_errors (func=0xfffffffc, func_args=0x8,
errstring=0x1076f0d0 "", mask=272564224) at ../../package/gdb/top.c:503
#34 0x10047134 in main (argc=-4, argv=0x8) at
../../package/gdb/main.c:734
#35 0x0fda9e74 in __libc_start_main (argc=1, ubp_av=0x7ffffdc4,
ubp_ev=0x1, auxvec=0x7ffffe0c, rtld_fini=0xfffffffc, stinfo=0x10047104,
stack_on_entry=0xfdbdfe8) at ../sysdeps/powerpc/elf/libc-start.c:119
(top-gdb) c
Continuing.
Program exited with code 02.
(gdb) run
Starting program: /home/root/test-shared
Reading symbols from /lib/libpthread.so.0...
Program received signal SIGSEGV, Segmentation fault.
0x0fe04b08 in strchr () from /lib/libc.so.6
(top-gdb) bt
Reading in symbols for ../../package/gdb/dbxread.c...done.
Reading in symbols for ../../package/gdb/elfread.c... and
../../package/gdb/solib-svr4.c...done.
Reading in symbols for ../../package/gdb/solib.c...done.
#0 0x0fe04b08 in strchr () from /lib/libc.so.6
#1 0x1010597c in end_psymtab (pst=0x106f5ea0, include_list=0x7fffe910,
num_includes=1, capping_symbol_offset=-16843009,
capping_text=2139062143,
dependency_list=0x7fffe880, number_dependencies=0,
textlow_not_set=1) at ../../package/gdb/dbxread.c:2253
#2 0x10104a40 in read_dbx_symtab (objfile=0x104e4a88) at
../../package/gdb/dbxread.c:1524
#3 0x101033c4 in dbx_symfile_read (objfile=0x104e4a88, mainline=0) at
../../package/gdb/dbxread.c:601
#4 0x10107404 in elfstab_build_psymtabs (objfile=0x104e4a88,
mainline=976894522, staboffset=180223, stabsize=273566376,
stabstroffset=259116,
stabstrsize=180222) at ../../package/gdb/dbxread.c:3460
#5 0x1010b4f8 in elf_symfile_read (objfile=0x104e4a88, mainline=0) at
../../package/gdb/elfread.c:613
#6 0x10069168 in syms_from_objfile (objfile=0x104e4a88,
addrs=0x1070a9e0, mainline=0, verbo=0) at
../../package/gdb/symfile.c:759
#7 0x10069410 in symbol_file_add (name=0x104eac28
"/lib/libpthread.so.0", from_tty=0, addrs=0x1070a9e0, mainline=0,
flags=8)
at ../../package/gdb/symfile.c:888
#8 0x10096b14 in symbol_add_stub (arg=0x302174cd) at
../../package/gdb/solib.c:341
#9 0x100c9424 in do_catch_errors (uiout=0x302174cd, data=0x3a3a3a3a) at
../../package/gdb/top.c:491
#10 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff008, func_val=0x7ffff010,
func_caught=0x7ffff014,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=6) at
../../package/gdb/top.c:423
#11 0x100c9470 in catch_errors (func=0x302174cd, func_args=0x3a3a3a3a,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=272433152)
at ../../package/gdb/top.c:503
#12 0x10096e68 in solib_add (pattern=0x0, from_tty=0, target=0x104eaa20,
readsyms=671360066) at ../../package/gdb/solib.c:568
#13 0x10076e2c in handle_inferior_event (ecs=0x7ffff128) at
../../package/gdb/infrun.c:2439
#14 0x1007542c in wait_for_inferior () at
../../package/gdb/infrun.c:1241
#15 0x10075194 in proceed (addr=0, siggnal=TARGET_SIGNAL_0, step=0) at
../../package/gdb/infrun.c:1037
#16 0x100e872c in child_create_inferior (exec_file=0x302174cd <Address
0x302174cd out of bounds>, allargs=0x3a3a3a3a <Address 0x3a3a3a3a out of
bounds>,
env=0x1) at ../../package/gdb/inftarg.c:474
#17 0x1009b664 in lin_lwp_create_inferior (exec_file=0x302174cd <Address
0x302174cd out of bounds>, allargs=0x3a3a3a3a <Address 0x3a3a3a3a out of
bounds>,
env=0x1) at ../../package/gdb/lin-lwp.c:1330
#18 0x100ee8e0 in thread_db_create_inferior (exec_file=0x10412b78
"/home/root/test-shared", allargs=0x10425720 "", env=0x103f8330)
at ../../package/gdb/thread-db.c:901
#19 0x10071884 in run_command (args=0x0, from_tty=272783136) at
../../package/gdb/infcmd.c:463
#20 0x1013d9ac in do_cfunc (c=0x302174cd, args=0x3a3a3a3a <Address
0x3a3a3a3a out of bounds>, from_tty=1) at
../../package/gdb/cli/cli-decode.c:50
#21 0x100c9940 in execute_command (p=0x103ee1d3 "", from_tty=1) at
../../package/gdb/top.c:715
#22 0x100817bc in command_handler (command=0x103ee1d0 "") at
../../package/gdb/event-top.c:504
#23 0x10081f68 in command_line_handler (rl=0x103d68e8 "") at
../../package/gdb/event-top.c:802
#24 0x102f3008 in rl_callback_read_char () at
../../package/readline/callback.c:114
#25 0x10080b08 in rl_callback_read_char_wrapper (client_data=0x302174cd)
at ../../package/gdb/event-top.c:168
#26 0x10081624 in stdin_event_handler (error=807498957,
client_data=0x302174cd) at ../../package/gdb/event-top.c:418
#27 0x100e4158 in handle_file_event (event_file_desc=807498957) at
../../package/gdb/event-loop.c:714
#28 0x100e39b4 in process_event () at ../../package/gdb/event-loop.c:335
#29 0x100e3a0c in gdb_do_one_event (data=0x302174cd) at
../../package/gdb/event-loop.c:372
#30 0x100c9424 in do_catch_errors (uiout=0x302174cd, data=0x3a3a3a3a) at
../../package/gdb/top.c:491
#31 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff6c8, func_val=0x7ffff6d0,
func_caught=0x7ffff6d4,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=6) at
../../package/gdb/top.c:423
#32 0x100c9470 in catch_errors (func=0x302174cd, func_args=0x3a3a3a3a,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=272433152)
at ../../package/gdb/top.c:503
#33 0x100e3a74 in start_event_loop () at
../../package/gdb/event-loop.c:416
#34 0x10080c24 in cli_command_loop () at
../../package/gdb/event-top.c:200
#35 0x100465b4 in captured_command_loop (data=0x302174cd) at
../../package/gdb/main.c:94
#36 0x100c9424 in do_catch_errors (uiout=0x302174cd, data=0x3a3a3a3a) at
../../package/gdb/top.c:491
#37 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x1040b4a8, func_args=0x7ffff968, func_val=0x7ffff970,
func_caught=0x7ffff974,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=6) at
../../package/gdb/top.c:423
#38 0x100c9470 in catch_errors (func=0x302174cd, func_args=0x3a3a3a3a,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=272433152)
at ../../package/gdb/top.c:503
#39 0x10047100 in captured_main (data=0x302174cd) at
../../package/gdb/main.c:723
#40 0x100c9424 in do_catch_errors (uiout=0x302174cd, data=0x3a3a3a3a) at
../../package/gdb/top.c:491
#41 0x100c9298 in catcher (func=0x100c9408 <do_catch_errors>,
func_uiout=0x103ade60, func_args=0x7ffffd38, func_val=0x7ffffd40,
func_caught=0x7ffffd44,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=6) at
../../package/gdb/top.c:423
#42 0x100c9470 in catch_errors (func=0x302174cd, func_args=0x3a3a3a3a,
errstring=0x302174cc <Address 0x302174cc out of bounds>, mask=272433152)
at ../../package/gdb/top.c:503
#43 0x10047134 in main (argc=807498957, argv=0x3a3a3a3a) at
../../package/gdb/main.c:734
#44 0x0fda9e74 in __libc_start_main (argc=1, ubp_av=0x7ffffdc4,
ubp_ev=0x1, auxvec=0x7ffffe0c, rtld_fini=0x302174cd, stinfo=0x10047104,
stack_on_entry=0xffffffff) at
../sysdeps/powerpc/elf/libc-start.c:119
(top-gdb) quit
This problem seems to be isolated to PPC specifically.. when running
your patch on x86, everything behaves just fine.
Running this through strace, I see the following on the open() for
libpthread:
open("/lib/libpthread.so.0", O_RDONLY) = 9
lstat64(0x7fffcf30, 0x7fffdf40) = 0
lstat64(0x7fffcf30, 0x7fffdf40) = 0
readlink("/lib/libpthread.so.0", "libpthread-0.9.so", 4095) = 17
lstat64(0x7fffcf30, 0x7fffdf40) = 0
fcntl64(9, F_GETFL) = 0 (flags O_RDONLY)
fcntl64(9, F_GETFL) = 0 (flags O_RDONLY)
fstat64(0x9, 0x7fffefc8) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x3001f000
_llseek(0x9, 0, 0, 0x7ffff038, 0x1) = 0
read(9, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0B\214"...,
4096) = 4096
_llseek(0x9, 0, 0x6b000, 0x7fffee78, 0) = 0
read(9, "_minfo:14,ns_t_mx:15,ns_t_txt:16"..., 4096) = 4096
_llseek(0x9, 0, 0x6c000, 0x7fffede8, 0) = 0
_llseek(0x9, 0, 0, 0x7fffee78, 0) = 0
read(9, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0B\214"...,
4096) = 4096
fstat(9, {st_mode=S_IFREG|0755, st_size=479636, ...}) = 0
_llseek(0x9, 0, 0x6f000, 0x7fffeb98, 0) = 0
read(9, "\0\2C\324\0\0\0\26\0\0\345\30\0\2D\4\0\0\0\26\0\0\345,"...,
4096) = 4096
read(9, "\0\0\10\0\0\0\0\0\0\0\0\0\4\0\377\361\0\0\10\t\0\0\0\0"...,
8192) = 8192
read(9, "\0\0.V\0\0q\250\0\0\0@\22\0\0\v\0\0.i\0\0\304\300\0\0\0"...,
4096) = 4096
read(9, "_restfpr_21\0_restfpr_14_x\0_restg"..., 8192) = 8192
read(9, "tex_init\0lseek64\0open\0__fcntl\0ge"..., 4096) = 404
_llseek(0x9, 0, 0x3000, 0x7fffeb28, 0) = 0
read(9, "bc_pause\0__libc_pread\0__libc_pre"..., 4096) = 4096
_llseek(0x9, 0, 0x2000, 0x7fffeac8, 0) = 0
read(9, "\0\0\0\0\0\0\0\354\"\0\0\0\0\0\2\243\0\0\0\0\0\0\0\20\22"...,
4096) = 4096
read(9, "bc_pause\0__libc_pread\0__libc_pre"..., 4096) = 4096
_llseek(0x9, 0, 0x4000, 0x7fffeb28, 0) = 0
_llseek(0x9, 0, 0, 0x7fffeb98, 0) = 0
read(9, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0B\214"...,
4096) = 4096
read(9, "\0\0006\264\0\0\0\0\3\0\0\6\0\0\0\0\0\0007\240\0\0\0\0"...,
4096) = 4096
read(9, "\0\0\0\0\0\0\0\354\"\0\0\0\0\0\2\243\0\0\0\0\0\0\0\20\22"...,
4096) = 4096
_llseek(0x9, 0, 0x3000, 0x7fffeb98, 0) = 0
read(9, "bc_pause\0__libc_pread\0__libc_pre"..., 4096) = 4096
fstat(9, {st_mode=S_IFREG|0755, st_size=479636, ...}) = 0
_llseek(0x9, 0, 0x3f000, 0x7fffec68, 0) = 0
read(9, "\0\0\201\340\302\0\0\0\0\0\0\0\0\0A\303\302\0\0\0\0\0\0"...,
4096) = 4096
read(9, "(14,49)=(14,5)\0__fsfilcnt_t:t(14"..., 176128) = 176128
read(9, "_minfo:14,ns_t_mx:15,ns_t_txt:16"..., 4096) = 4096
_llseek(0x9, 0, 0x15000, 0x7fffec48, 0) = 0
read(9, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 4096
read(9, "\200\0\0;\0\0\0\0\0\0\10\257\200\0\0=\0\0\0\0\0\0\10\307"...,
45056) = 45056
read(9, "\0\0\0\0D\0\2\26\0\0\0\200\0\0\0\0D\0\2\25\0\0\0\204\0"...,
4096) = 4096
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
whereas when it does it the first time around, it subsequently calls
brk() numerous times:
brk(0x1049b000) = 0x1049b000
brk(0x1049c000) = 0x1049c000
...
Comments?
Regards,
--
Paul Mundt <paul.mundt@timesys.com>
TimeSys Corporation
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: SIG32/SIGTRAP issues
2002-12-04 10:30 ` Paul Mundt
@ 2002-12-04 10:44 ` Daniel Jacobowitz
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2002-12-04 10:44 UTC (permalink / raw)
To: Paul Mundt; +Cc: gdb
On Wed, Dec 04, 2002 at 02:33:57PM -0500, Paul Mundt wrote:
> Hi,
>
> On Tue, 2002-12-03 at 18:24, Daniel Jacobowitz wrote:
> > Funny, no one reports this for months and this is the third report I've
> > seen in a week... At the bottom of this message is a workaround. I'm
> > not proposing it be committed, since it's obviously pretty gross. The
> > real issue is the concept of thread_stratum and core_stratum as
> > separate from process_stratum. I don't think it's appropriate - if we
> > are debugging a core and process at the same time this isn't how it
> > should work. This ties in to all the make-targets-a-real-stack thing -
> > I'm not entirely convinced on that score either.
>
> Okay, making progress. This takes care of the SIG32/SIGTRAP issues,
> though now it looks like PPC is stuck on SIG33 issues.
>
> Running the same test-case from yesterday, if I run the shared version
> twice in a row, gdb segfaults. If I run the shared or static version of
> the app under gdb under gdb, I get SIG33 (which occurs in different
> locations per-thread if its static).
SIG33 is CANCEL. Lin-lwp should be reporting it as such. Do you have
__pthread_sig_cancel in your library? Is check_thread_signals working?
> (top-gdb) bt
> Reading in symbols for ../../package/gdb/dbxread.c...done.
> Reading in symbols for ../../package/gdb/elfread.c... and
> ../../package/gdb/solib-svr4.c...done.
> Reading in symbols for ../../package/gdb/solib.c...done.
> #0 0x0fe04b08 in strchr () from /lib/libc.so.6
> #1 0x1010597c in end_psymtab (pst=0x106f5ea0, include_list=0x7fffe910,
> num_includes=1, capping_symbol_offset=-16843009,
> capping_text=2139062143,
> dependency_list=0x7fffe880, number_dependencies=0,
> textlow_not_set=1) at ../../package/gdb/dbxread.c:2253
> #2 0x10104a40 in read_dbx_symtab (objfile=0x104e4a88) at
> ../../package/gdb/dbxread.c:1524
Dunno about this one, try a newer GDB maybe.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-12-04 18:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-03 14:52 SIG32/SIGTRAP issues Paul Mundt
2002-12-03 15:24 ` Daniel Jacobowitz
2002-12-03 15:30 ` H. J. Lu
2002-12-03 15:43 ` Daniel Jacobowitz
2002-12-03 15:58 ` H. J. Lu
2002-12-03 15:52 ` Andrew Cagney
2002-12-03 15:58 ` Daniel Jacobowitz
2002-12-03 16:09 ` H. J. Lu
2002-12-04 10:30 ` Paul Mundt
2002-12-04 10:44 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox