[uCsimm] gdbserver weirdness

From: ucsimm@jline.com
Date: Wed Oct 18 2000 - 04:15:14 EDT


hi, i've been trying to get remote debugging working but am running
into problems. i hope someone can recognize what i'm doing wrong since
i'm at a loss.

i followed kwonsk's directions, as best i could. i'm using a recently
received uclinux cd with the following rpm's installed:

libc6/uClinux-2.0.38.1pre5-2.i386.rpm
and...
libc6/m68k-coff-binutils-2.9.1-1.i386.rpm
libc6/m68k-coff-gcc-2.7.2.3-1.i386.rpm
libc6/m68k-pic-coff-binutils-2.9.1-1.i386.rpm
libc6/m68k-pic-coff-gcc-2.7.2.3-1.i386.rpm
libc6/uC-libc-0.9.1-1.i386.rpm
libc6/uC-libm-0.9.1-1.i386.rpm
libc6/uC-src-0.9.2-2.i386.rpm
libc6/genromfs-0.3-1.i386.rpm
libc6/romdisk-0.9.1-1.i386.rpm

i ran into my first problem here where my particular version of this
file does not contain this code:

> 1.3 Patch the kernel for Trap #1 support(breakpoint)
> patch linux/arch/m68knommu/kernel/traps.c
>
> about line 210?
> add new vector like this
> _ramvec[15] = trap15;
> _ramvec[33] = trap33; <---- added line
> this trap33 is #if 0ed below

also, my version already contained this particular patch:

> delete the line that treat Trap #1 as a Illeagal Instructin Signal
> about line 485?
> case VEC_TRAP1: ----> delete this
>
> add new VEC_TRAP1 case statement before defalut case
> about line 530?
> case VEC_TRAP1:
> /* kwonsk: is this right? */
> fp->ptregs.pc -= 2;
> sig = SIGTRAP;
> break;
> default:
> sig = SIGILL;
> break;

so i skipped these steps. i recompiled the kernel anyway, installed
it, and continued following the directions.

i swear, i thought i successfully stopped at a breakpoint once, but
the next 'c' command failed. however, after that one so-called
success, i see this same result repeatedly below. i don't understand
the code yet, and esp. not sure where traps are redefined.

please let me know if the problem is obvious to anyone. thanks!

jae

*** START ***

HOST:

 $ ./gdb test3.coff
GNU gdb 4.18
Copyright 1998 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=i586-pc-linux-gnu
--target=m68k-unknown-coff"...
(gdb) target remote 192.168.0.1:3000
Remote debugging using 192.168.0.1:3000
0x780058 in text_start ()
(gdb) list
1
2 main(int argc, char * argv[])
3 {
4 int test = 100;
5 printf("test => %d\n", test);
6 test++;
7 printf("test => %d\n", test);
8 test++;
9 printf("test => %d\n", test);
10 test++;
(gdb) b 4
Breakpoint 1 at 0x78009c: file test3.c, line 4.
(gdb) c
Continuing.

Program exited with code 012.
(gdb)

BOARD:

uCsimm login: asdf
Password:

# cd /var
# ls
lost+found
# cp /usr/prod/src/test3 .
# ./test3
test => 100
test => 101
test => 102
test => 103
test => 104
# /usr/prod/src/gdbserver :3000 test3
Process test3 created; pid = 21
code at 780058, data at 77a018
Remote debugging using :3000
Trap #1
PC[0078009e] SSP[007cfff8] USP[0077b560] BootstrapSP[0001ffb6]

    D0 D1 D2 D3 D4 D5 D6 D7
00000000 ffffffff 00758a70 00758a78 007d0460 0077b580 00000000
00000001
    A0 A1 A2 A3 A4 A5 A6
0077a0d8 0077a588 00758a70 00758a68 10c9417d 0077a018 0077b564
test => -1
test => 0
test => 1
test => 2
test => 3

Child exited with retcode = a

Child exited with status 0
GDBserver exiting
#

*** END ***

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:38 EST