Thread View: gnu.gdb.bug
2 messages
2 total messages
Started by kar
Fri, 12 Apr 2002 19:51
Remote debugging on Intel
Author: kar
Date: Fri, 12 Apr 2002 19:51
Date: Fri, 12 Apr 2002 19:51
67 lines
3258 bytes
3258 bytes
Hello! The problem: I cannot get gdb to remotely debug a program on another machine. The players: gdb 5.1.1, configured as i386-pc-solaris2.7 The situation: The host and target machines are both Intel boxes running Solaris 2.7. I have implemented the needed routines in the i386-stub.c file, and the two machines do talk correctly with each other across the serial line. I link the stub into my program and boot it on the target machine; the first thing it does after calling set_debug_traps() is to call breakpoint(). When I issue the target remote command, it responds with an error: Couldn't establish connection to remote target procfs: couldn't find pid 42000 in procinfo list Based on what I found looking through the source for gdb, I implemented the qC command in the i386-stub and had it return an ID of -1. Here is the output that is produced: Script started on Fri Apr 12 15:24:42 2002 sholto kar 1: gdb GNU gdb 5.1.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 "i386-pc-solaris2.7". Setting up the environment for debugging gdb. gdbinit:5: Error in sourced command file: No symbol table is loaded. Use the "file" command. (gdb) target remote /dev/ttyb Remote debugging using /dev/ttyb sent qC packet, reply = QC-1 (oldpid = 42000) <== my debug output calling find_procinfo_or_die from stopped_by_watchpoint <== my debug output Couldn't establish connection to remote target procfs: couldn't find pid -1 in procinfo list. (gdb) quit sholto kar 2: exit script done on Fri Apr 12 15:25:40 2002 The "QC-1" is what the stub sent back to gdb, which shows that the communication is working. My guess as to the cause of the problem: I don't have one. Thanks for any information you can give me! - Ken --- Kenneth A. Reek, Professor Rochester Institute of Technology Department of Computer Science 102 Lomb Memorial Drive Rochester, NY 14623-0887 USA kar@cs.rit.edu 716-475-6155 (voice) 716-475-7100 (fax)
Re: Remote debugging on Intel
Author: Michael Snyder
Date: Fri, 26 Apr 2002 23:55
Date: Fri, 26 Apr 2002 23:55
68 lines
4457 bytes
4457 bytes
kar@cs.rit.edu wrote: > > Hello! > > The problem: I cannot get gdb to remotely debug a program on another machine. > > The players: gdb 5.1.1, configured as i386-pc-solaris2.7 > > The situation: The host and target machines are both Intel boxes running > Solaris 2.7. I have implemented the needed routines in the > i386-stub.c file, and the two machines do talk correctly with > each other across the serial line. > > I link the stub into my program and boot it on the target machine; > the first thing it does after calling set_debug_traps() is to call > breakpoint(). > > When I issue the target remote command, it responds with an error: > > Couldn't establish connection to remote target > procfs: couldn't find pid 42000 in procinfo list > > Based on what I found looking through the source for gdb, I > implemented the qC command in the i386-stub and had it return > an ID of -1. Here is the output that is produced: > > Script started on Fri Apr 12 15:24:42 2002 > > sholto kar 1: gdb > GNU gdb 5.1.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 "i386-pc-solaris2.7". > Setting up the environment for debugging gdb. > gdbinit:5: Error in sourced command file: > No symbol table is loaded. Use the "file" command. > (gdb) target remote /dev/ttyb > Remote debugging using /dev/ttyb > sent qC packet, reply = QC-1 (oldpid = 42000) <== my debug output Well, first of all, you don't need to instrument with your own debug output. It's already instrumented. Use this command: (gdb) set debug remote 1 > calling find_procinfo_or_die from stopped_by_watchpoint <== my debug output OK, well neither of these functions should be being called (find_procinfo_or_die or stopped_by_watchpoint). This is a little weird. No, it's very weird. > Couldn't establish connection to remote target > procfs: couldn't find pid -1 in procinfo list. > (gdb) quit > > sholto kar 2: exit > script done on Fri Apr 12 15:25:40 2002 > > The "QC-1" is what the stub sent back to gdb, which shows that > the communication is working. > > My guess as to the cause of the problem: I don't have one. Not enough info. Try it with "set debug remote 1" and see what it says then.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads