From: Daniel Jacobowitz <drow@mvista.com>
To: Balarama Krishna <balaram@samsung.com>
Cc: gdb@sources.redhat.com
Subject: Re: pthread_create, Program received signal ?, Unknown signal
Date: Mon, 01 Sep 2003 16:26:00 -0000 [thread overview]
Message-ID: <20030901162616.GB7465@nevyn.them.org> (raw)
In-Reply-To: <1062421948.1343.136.camel@Lotus>
On Mon, Sep 01, 2003 at 06:42:29PM +0530, Balarama Krishna wrote:
> Hi,
>
> I am trying to debug a multi-threaded application on arm-linux target
> from i386-linux host using GDB-5.3.
You seem to be using glibc 2.3.x. Am I right?
If so, try CVS gdb instead. A change in the definition of SIGRTMIN
causes this symptom.
>
> I am using gcc(3.2.3) and using the same set of shared libraries (came
> with gcc(3.2.3)on the target also in order to run gdbserver.
>
> Below is my sample application
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 1 #include <stdio.h>
> 2 #include <pthread.h>
> 3
> 4 void * call_back(void *);
> 5 int main()
> 6 {
> 7 int count=0;
> 8 pthread_t thread_id;
> 9 if ( pthread_create(&thread_id, NULL, call_back, NULL)
> != 0){
> 10 perror("pthread_create() Failed");
> 11 return 0;
> 12 }
> 13 while(1){
> 14 count++;
> 15 sleep(1);
> 16 printf("Main Thread Count (%d) \n", count);
> 17 }
> 18 }
> 19 void * call_back(void *arg)
> 20 {
> 21 int count=0;
> 22 while(1){
> 23 count++;
> 24 sleep(3);
> 25 printf("Thread Loop count (%d) \n", count);
> 26 }
> 27 }
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> Screen shot on the HOST side
>
> /%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/
> GNU gdb 5.3
> 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 "--host=i686-pc-linux-gnu
> --target=arm-linux".
> (gdb) et solib-absolute-prefix /dev/null
> Undefined command: "et". Try "help".
> (gdb) set solib-absolute-prefix /dev/null
> (gdb) set solib-search-path /home/balaram/links_to_lib_dir
> (gdb) file threads
> Reading symbols from threads...done.
> (gdb) target remote 107.108.3.197:2020
> Remote debugging using 107.108.3.197:2020
> 0x40002560 in ?? ()
> (gdb) break 9
> Breakpoint 1 at 0x84d0: file threads.c, line 9.
> (gdb) cont
> Continuing.
>
> Breakpoint 1, main () at threads.c:9
> 9 if ( pthread_create(&thread_id, NULL, call_back, NULL)
> != 0){
> (gdb) n
>
> Program received signal ?, Unknown signal.
> 0x4005b3a4 in ?? ()
> (gdb)
> /%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/
>
>
> On the Target Side, the child thread got created and this is the
> following screen shot
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> ./gdbserver 107.108.3.197:2020 ./threads
> Process ./threads created; pid = 189
> Remote debugging from host 107.108.3.145
> Thread Loop count (1)
> Thread Loop count (2)
> Thread Loop count (3)
> Thread Loop count (4)
> Thread Loop count (5)
> Thread Loop count (6)
> Thread Loop count (7)
> Thread Loop count (8)
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
>
> Points to be clarified
> ----------------------
> 1. What happened to debug messages from Main thread on the target?
> 2. How to resolve the error messgae "Program received signal ?, Unknown
> signal" came on the Host Side.
>
> Am I missing anything out in this case?
>
>
> Thanks and Regards,
> Balaram.
>
>
>
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-09-01 16:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-01 13:18 Balarama Krishna
2003-09-01 16:26 ` Daniel Jacobowitz [this message]
2003-09-02 5:19 ` Balarama Krishna
2003-09-02 11:57 ` Balarama Krishna
2003-09-02 12:27 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030901162616.GB7465@nevyn.them.org \
--to=drow@mvista.com \
--cc=balaram@samsung.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox