This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I'm trying to get gdb-4-17 to support a new remote target and am having some problems. It's an MPC860 through HMI's BDM pod. The stuff for SDS's BDM pod was similar, so I modified remote-sds.c so that is would work with HMI's pod. I can read and set memory and registers, but I can't execute anything. I thought I should be able to do something like this to run a program. target hmi /dev/ttyS0 file flash.out run When I try this, I get a message 'You can't do that without a process to debug'. I've stepped through gdb and it seems like current_target is getting reset from the HMI target to 'local exec file'. Should that be happenning? I thought I could just modify remote-sds.c to use HMI commands instead of SDS ones and it would work. I also added some MPC860 registers to tm-rs6000.h. Is there something I missed? Also, I can view the registers, until I change one. After that I get a message 'No selected frame.' Why? I've included a session from gdb below. Even when I finally get gdb to run my program, I don't think it actually runs it. The program supposed to erase some flash memory but doesn't. I've tested the program without gdb, and it works correctly. I would really appreciate any suggestions about getting gdb to work. Thanks. 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-gnulibc1 --target=powerpc-rtems-eabi". (gdb) target hmi /dev/ttyS0 Remote debugging using /dev/ttyS0 0x104 in ?? () (gdb) info registers r0 0x0 0 < I deleted r1-r30 to shorten this > r31 0x0 0 pc 0x104 260 ps 0x40 64 cnd 0x20000000 536870912 lr 0x0 0 cnt 0x397c2836 964438070 xer 0xfc7c 64636 mq 0x0 0 immr 0xff000013 -16777197 der 0xffe7400f -1622001 ictrl 0x7 7 (gdb) set $pc=0x0 (gdb) info registers No selected frame. <------- What's this all about? (gdb) target hmi /dev/ttyS0 A program is being debugged already. Kill it? (y or n) y Remote debugging using /dev/ttyS0 0x0 in ?? () (gdb) info registers r0 0x0 0 < I deleted r1-r30 to shorten this > r31 0x0 0 pc 0x0 0 <--------- this changed like I told it to ps 0x40 64 cnd 0x20000000 536870912 lr 0x0 0 cnt 0x397c2836 964438070 xer 0xfc7c 64636 mq 0x0 0 immr 0xff000013 -16777197 der 0xffe7400f -1622001 ictrl 0x7 7 (gdb) file flash.out A program is being debugged already. Kill it? (y or n) y <--- What program? Reading symbols from flash.out...done. (gdb) r Starting program: /home/jtm/crossdev/build-gdb/flash.out You can't do that without a process to debug (gdb) load flash.out You can't do that when your target is `exec' (gdb) target hmi /dev/ttyS0 Remote debugging using /dev/ttyS0 0x0 in __eabi () (gdb) load flash.out Loading section .text, size 0x440 lma 0x0 Loading section .got, size 0x10 lma 0x440 Start address 0x4 Transfer rate: 1472 bits/sec. (gdb) r Starting program: /home/jtm/crossdev/build-gdb/flash.out Program exited normally. (gdb)