bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remote debugging on Intel


From: Michael Snyder
Subject: Re: Remote debugging on Intel
Date: Fri, 26 Apr 2002 16:55:39 -0700

address@hidden 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]