Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Balarama Krishna <balaram@samsung.com>
To: gdb@sources.redhat.com
Subject: Problem using gdbserver
Date: Thu, 28 Aug 2003 06:58:00 -0000	[thread overview]
Message-ID: <014401c36d30$c70c8490$91036c6b@sisodomain.com> (raw)
In-Reply-To: <20030826141736.GA21856@nevyn.them.org>

Hi,

The set up for GDB as remote debugger (target=arm-linux, host=i386) is
successful.
The following is my sample test program "test.c"
/******************************************************/
#include <stdio.h>
int main()
{
        int i;
        printf("Hello World \n");
        for(i=0; i<3; i++)
                printf("Checking counter %d \n", i);
        return 0;
}
/***************************************************/

I compiled the above program using arm-linux-gcc with -g option and kept in
the target.
These are the following snap shots while debugging this program

/********************************* TARGET*********************** *****/
[root@Linux /mnt]$./gdbserver 107.108.3.197:2020 test
Process test created; pid = 227
Remote debugging from host 107.108.4.244
Hellotest (227): undefined instruction: pc=02000354
Code: e59f003c ebffffc8 (e7ffdefe) e50b3010 e51b3010
 World
test (227): undefined instruction: pc=02000358
Code: ebffffc8 e3a03000 (e7ffdefe) e51b3010 e3530002

Child terminated with signal = 4

Child terminated with signal = 0x4
GDBserver exiting
[root@Linux /mnt]$

/**** ******************************HOST********************* ******/
(gdb) target remote 107.108.3.197:2020
Remote debugging using 107.108.3.197:2020
0x40002560 in ?? ()
(gdb) symbol-file test
Reading symbols from test...done.
(gdb) list
1       #include <stdio.h>
2
3       int main()
4       {
5
6               int i;
7
8               printf("Hello World \n");
9
10
(gdb) list
11              for(i=0; i<3; i++)
12                      printf("Checking counter %d \n", i);
13
14              return 0;
15      }
16
(gdb) break 11
Breakpoint 1 at 0x2000354: file test.c, line 11.
(gdb) cont
Continuing.

Breakpoint 1, main () at test.c:11
11              for(i=0; i<3; i++)
(gdb) n

Program received signal SIGILL, Illegal instruction.
0x02000358 in main () at test.c:11
11              for(i=0; i<3; i++)
(gdb) n

Program terminated with signal SIGILL, Illegal instruction.
The program no longer exists.
(gdb)

/***************************************************************************
******/

I don't know why things are going wrong. Am I missing some thing?? One can
observe that "Hello World" is printed seperately on the Target. Any kind of
help is appreciated in this regard.

Thanks & Regards,
Balaram.



  reply	other threads:[~2003-08-28  6:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-26 14:14 Help Needed: set up GDB Remote Debugger (arm-linux) Balarama Krishna
2003-08-26 14:17 ` Daniel Jacobowitz
2003-08-28  6:58   ` Balarama Krishna [this message]
2003-08-28 10:51     ` Problem using gdbserver Balarama Krishna
2003-08-28 11:00 Niu Liang-yong-A16450
2003-08-29  8:22 Niu Liang-yong-A16450
2003-08-29  9:43 ` Satheesha.T.N
2003-08-29 13:55   ` 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='014401c36d30$c70c8490$91036c6b@sisodomain.com' \
    --to=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