From: Daniel Jacobowitz <drow@mvista.com>
To: Kris Warkentin <kewarken@qnx.com>
Cc: Mark Kettenis <kettenis@chello.nl>,
Andrew Cagney <ac131313@redhat.com>,
gdb-patches@sources.redhat.com
Subject: Re: patch to add QNX NTO i386 support
Date: Thu, 13 Feb 2003 22:08:00 -0000 [thread overview]
Message-ID: <20030213220751.GA15234@nevyn.them.org> (raw)
In-Reply-To: <01dd01c2d3aa$d4c1b1c0$0202040a@catdog>
On Thu, Feb 13, 2003 at 04:56:58PM -0500, Kris Warkentin wrote:
> > > #define HANDLE_SVR4_EXEC_EMULATORS 1
> > > #include "solib.h" /* shared lib support */
> >
> > Including solib.h is fine. However I wonder why you need
> > HANDLE_SVR4_EXEC_EMULATORS. AFAIK this deals with Solaris BCP
> > (running SunOS 4 a.out files on Solaris 2 a.k.a. SunOS 5). What is
> > its relevance on QNX? Could this be the reason that you need to set
> > SOLIB_BKPT_NAME?
>
> I've discovered why HANDLE_SVR4_EXEC_EMULATORS is needed but I'm not sure of
> the correct way to fix it. The relevant code is from solib-svr4.c below. A
> typical remote qnx debugging session would be something like this:
>
> kewarken@CATDOG ~/test
> $ ntox86-gdb
> GNU gdb 5.2.1qnx-326 QNX Neutrino 6.2.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 "--host=i686-pc-cygwin --target=ntox86".
> (gdb) target qnx ren:10000
> Remote debugging using ren:10000
> (gdb) sym blah
> Reading symbols from blah...done.
Silly question - why not say "file blah" here? That'll set exec_bfd,
and you'll be just fine.
If I'm right, and you want to support the above sequence, you could
probably locally make sym set the exec file, if none was set.
> (gdb) upload blah /tmp/blah
> (gdb) r /tmp/blah
> Starting program: /tmp/blah
> (gdb) b main
> Breakpoint 1 at 0x8048402: file blah.c, line 10.
> (gdb) c
> Continuing.
>
> Breakpoint 1, main () at blah.c:10
> 10 func();
>
> The problem that we're running into is that exec_bfd is NULL in the code
> below so we fall back on the 'hard way' which is not really necessary (if
> exec_bfd is set). On the native qnx gdb, this isn't a problem because
> exec_bfd is set when main() calls attach_command() which calls
> exec_file_attach(). What I'd like to know is at what point should I stuff
> exec_bfd? In the case of remote debugging, the file with the symbols is
> '/home/kewarken/test/blah' and the file being run (on the remote) is
> /tmp/blah. We need to set exec_bfd to point to the same file as the one
> we've read symbols from but the question is, when and where?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-02-13 22:08 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-03 20:19 Kris Warkentin
2003-02-04 7:23 ` Eli Zaretskii
2003-02-04 13:33 ` Kris Warkentin
2003-02-04 13:53 ` Kris Warkentin
2003-02-04 19:59 ` Eli Zaretskii
2003-02-04 20:12 ` Kris Warkentin
2003-02-05 5:50 ` Eli Zaretskii
2003-02-04 22:02 ` Andrew Cagney
2003-02-05 1:29 ` Kris Warkentin
2003-02-05 2:40 ` Andrew Cagney
2003-02-05 2:59 ` Andrew Cagney
2003-02-05 12:31 ` Kris Warkentin
2003-02-05 2:55 ` Andrew Cagney
2003-02-05 17:15 ` Kris Warkentin
2003-02-05 18:46 ` Andrew Cagney
2003-02-07 1:48 ` Kris Warkentin
2003-02-07 19:22 ` Mark Kettenis
2003-02-07 20:08 ` Kris Warkentin
2003-02-07 21:59 ` Andrew Cagney
2003-02-11 18:11 ` Kris Warkentin
2003-02-11 18:41 ` patch to add HAVE_CONTINUABLE_BREAKPOINT to target_ops Kris Warkentin
2003-02-12 22:18 ` patch to add QNX NTO i386 support Kris Warkentin
2003-02-12 22:44 ` Daniel Jacobowitz
2003-02-13 0:52 ` Kris Warkentin
2003-02-13 22:21 ` Mark Kettenis
2003-02-13 22:29 ` Kris Warkentin
2003-02-13 22:53 ` Mark Kettenis
2003-02-13 23:55 ` Kris Warkentin
2003-02-14 0:01 ` Kris Warkentin
2003-02-13 21:56 ` Kris Warkentin
2003-02-13 22:08 ` Daniel Jacobowitz [this message]
2003-02-13 22:25 ` Kris Warkentin
2003-02-13 22:29 ` Daniel Jacobowitz
2003-02-13 23:48 ` Kris Warkentin
2003-02-14 0:03 ` Daniel Jacobowitz
2003-02-14 0:09 ` Kris Warkentin
2003-02-14 0:13 ` Daniel Jacobowitz
2003-02-14 0:35 ` Kris Warkentin
2003-02-17 14:58 ` Andrew Cagney
2003-02-17 15:44 ` Daniel Jacobowitz
2003-02-17 16:45 ` Andrew Cagney
2003-02-17 18:54 ` Kris Warkentin
2003-02-18 21:26 ` Andrew Cagney
2003-02-18 22:30 ` Kris Warkentin
2003-02-20 0:42 ` Andrew Cagney
2003-02-27 19:02 ` Kris Warkentin
2003-02-27 19:56 ` Andrew Cagney
2003-02-27 20:02 ` Daniel Jacobowitz
2003-02-27 20:10 ` Andrew Cagney
2003-02-27 20:11 ` Kris Warkentin
2003-02-27 20:23 ` Andrew Cagney
2003-02-27 20:28 ` Kris Warkentin
2003-02-05 20:48 ` Mark Kettenis
2003-02-05 21:23 ` Kris Warkentin
2003-02-05 21:43 ` Kris Warkentin
2003-02-05 22:24 ` Mark Kettenis
2003-02-06 15:13 ` Kris Warkentin
2003-02-06 18:19 ` Andrew Cagney
2003-02-05 22:48 ` Mark Kettenis
2003-02-06 15:08 ` Kris Warkentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030213220751.GA15234@nevyn.them.org \
--to=drow@mvista.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
--cc=kewarken@qnx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox