Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Kris Warkentin <kewarken@qnx.com>
Cc: gdb@sources.redhat.com
Subject: Re: problem with exec-file when targetting remote machine
Date: Mon, 24 Mar 2003 20:36:00 -0000	[thread overview]
Message-ID: <20030324203652.GA27939@nevyn.them.org> (raw)
In-Reply-To: <003101c2f241$078b7050$0202040a@catdog>

On Mon, Mar 24, 2003 at 03:07:43PM -0500, Kris Warkentin wrote:
> This problem comes up when using the QNX remote protocol but it's probably
> more generic than that.  I'm not asking for a fix but more for some guidance
> as to what might be happening.
> 
> The long and short of it is that if I attach to a process on a remote
> machine after having read the symbols, everything works fine.  I run gdb,
> load symbols, set a breakpoint on main, run and get:
> 
> Breakpoint 1, main (argc=1, argv=0x803fcc4) at NetController.cpp:62
> 62         int   lSuccessCode = 0;   // Success
> 
> as one might expect.  If, however, exec-file has been set, either explicitly
> or implicitly by calling "gdb myapp" from the command line, I get something
> like:
> 
> Breakpoint 1, 0x40380000 in ?? ()
> (gdb) bt
> #0  0x40380000 in ?? ()
> #1  0x00000001 in ?? ()
> 
> Note that this doesn't happen with everything - it seems to be mostly with
> large projects, particularily C++.  There's obviously some data being read
> by gdb based on what the exec-file is set as that is causing a problem.
> 
> Can anyone give me an idea as to what gdb might be doing differently when
> exec-file has been set?

This means shared library handling is messed up, I bet.  It only
triggers based on exec_bfd.

Probably the app is being relocated in memory by the shared library
code, and ending up wrong.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-03-24 20:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24 20:07 Kris Warkentin
2003-03-24 20:36 ` Daniel Jacobowitz [this message]
2003-03-26 21:56   ` Kris Warkentin
2003-03-26 22:25     ` Andrew Cagney
2003-03-30  1:12       ` 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=20030324203652.GA27939@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --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