Article View: gnu.gdb.bug
Article #2311Remote debugging on Intel
From: 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)
Technical Details
Message-ID:
<200204121951.PAA26878@madrid.cs.rit.edu>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!news-x2.support.nl!newsfeed.equant.nl!newsfeed.equant.nl!news2.euro.net!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdbShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,e6e33499d163585c,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 2002-04-12 12:51:26 PST x-uunet-gateway: chi6sosrv13.alter.net from bug-gdb to gnu.gdb.bug; Fri, 12 Apr 2002 19:51:21 GMT From: kar@cs.rit.edu Message-ID: <200204121951.PAA26878@madrid.cs.rit.edu> Subject: Remote debugging on Intel Date: Fri, 12 Apr 2002 15:51:17 -0400 X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Approved: bug-gdb-request@mail.gnu.org Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!news-x2.support.nl!newsfeed.equant.nl!newsfeed.equant.nl!news2.euro.net!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb Sender: bug-gdb-request@mail.gnu.org Lines: 67