Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] remote: Avoid unwanted shlib internal BPs When debugging Linux kernel or u-boot with Abatron BDI emulator an error occurs:
Date: Fri, 01 Jun 2012 14:08:00 -0000	[thread overview]
Message-ID: <4FC8CCD7.9060800@redhat.com> (raw)
In-Reply-To: <1338557804-20910-1-git-send-email-Joakim.Tjernlund@transmode.se>

On 06/01/2012 02:36 PM, Joakim Tjernlund wrote:

> ..
> (gdb) tar remote bdi:2001
> Remote debugging using bdi:2001
> 0xeff80050 in ?? ()
> (gdb) mon reset
> (gdb) cont
> Continuing.
> Warning:
> Cannot insert breakpoint -1.
> Error accessing memory address 0xc0000000: Unknown error 4294967295.
> 
> (gdb) maintenance info breakpoints
> Num     Type           Disp Enb Address    What
> -1      shlib events   keep y   0xc0000000 <_stext> inf 1
> 
> gdb mistakenly inserts a special shared library BP even though
> there area no such libs in either linux or u-boot.


GDB has no special knowledge of the Linux kernel, nor of u-boot.
A GNU/Linux targeted GDB (*-*-linux-gnu) recognizes, and knows how to
debug user space applications.  If the kernel binary or the u-boot binary
look very much like GNU/Linux user space programs, the *-*-linux-gnu targeted
GDB will assume that's what they are.  If you used a bare metal elf/eabi
targeted GDB, which is really what those programs are, you'd not see this.

> Fix this by explicitly informing remote_add_inferior() that
> the remote is attached.


NAK.  This is not a "fix", it's papering over the problem, and
regresses GDB.  It makes GDB always detach on quit, instead of asking
the remote end whether it is "attached" or whether it has "spawned"
the inferior.

-- 
Pedro Alves


  reply	other threads:[~2012-06-01 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-01 13:37 Joakim Tjernlund
2012-06-01 14:08 ` Pedro Alves [this message]
2012-06-01 14:39   ` Joakim Tjernlund
2012-06-01 14:40     ` Pedro Alves
2012-06-01 14:48       ` Joakim Tjernlund
     [not found]       ` <OF322378AB.B2F2176F-ONC1257A10.0051062C-C1257A10.00514CCD@LocalDomain>
2012-06-01 14:49         ` Joakim Tjernlund
2012-06-01 14:53       ` Joakim Tjernlund
2012-06-01 14:56         ` Pedro Alves
2012-06-01 15:01           ` Joakim Tjernlund

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=4FC8CCD7.9060800@redhat.com \
    --to=palves@redhat.com \
    --cc=Joakim.Tjernlund@transmode.se \
    --cc=gdb-patches@sourceware.org \
    /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