public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Fix logic in exec_file_locate_attach
Date: Tue, 23 Feb 2016 11:27:00 -0000	[thread overview]
Message-ID: <20160223112721.GA22369@blade.nx> (raw)
In-Reply-To: <56CBA4BA.7050905@codesourcery.com>

Luis Machado wrote:
> On 02/22/2016 09:13 PM, Pedro Alves wrote:
> > On 02/23/2016 12:04 AM, Luis Machado wrote:
> > >On 02/22/2016 08:00 PM, Pedro Alves wrote:
> > > > On 02/22/2016 10:49 PM, Luis Machado wrote:
> > > > > On 02/22/2016 07:00 PM, Luis Machado wrote:
> > > > > > My idea was to guard both exec_file_attach and
> > > > > > symbol_file_add_main. We can't have anything in that
> > > > > > function throwing an error that won't be caught, otherwise
> > > > > > the above connection attempt will fail.
> > > > >
> > > > > For the record, you patch does fix the case of native GDB
> > > > > trying to attach to a process without pre-loading a symbol
> > > > > file. We get a multi-frame backtrace as expected.
> > > > >
> > > > > It is the gdb/gdbserver case that still seems to be broken.
> > > > 
> > > > Native is also broken as well for unexpectedly aborting the
> > > > attach sequence midway.  While "bt" doesn't show it, "detach"
> > > > does trip on it:
> > > 
> > > Sounds like we're looking into a try/catch block around such
> > > functions then?
> > 
> > Yes, I think so.  Probably best to make it two separate
> > try/catches, in case the file can't be loaded as executable but
> > succeeds as symbol file, for some reason.
> 
> Ok. I have the code in place, but i'm still crafting the testcase
> for both native / remote cases. Should have something later this
> week.

I hadn't considered user interrupts.

Pedro, are you ok if I commit my v2 patch
(https://sourceware.org/ml/gdb-patches/2016-02/msg00587.html)
as a fix for the sysroot-escaping behaviour we saw?

Thanks,
Gary

--
http://gbenson.net/

  reply	other threads:[~2016-02-23 11:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 14:19 [PATCH] Remote debugging without a binary (regression) Luis Machado
2016-02-11 16:35 ` Gary Benson
2016-02-11 17:06   ` Luis Machado
2016-02-11 17:31     ` Pedro Alves
2016-02-11 17:42       ` Luis Machado
2016-02-12 10:31     ` Gary Benson
2016-02-12 10:59       ` Luis Machado
2016-02-12 15:24       ` Pedro Alves
2016-02-17 13:53         ` Gary Benson
2016-02-17 14:40           ` Pedro Alves
2016-02-17 17:02           ` [OB PATCH] Add missing cleanup in exec_file_locate_attach Gary Benson
2016-02-17 17:05             ` Gary Benson
2016-02-17 18:11             ` Luis Machado
2016-02-18  9:54               ` Gary Benson
2016-02-18 17:05         ` [PATCH] Fix logic " Gary Benson
2016-02-18 17:28           ` Pedro Alves
2016-02-19 10:24             ` Gary Benson
2016-02-19 10:33               ` Luis Machado
2016-02-19 11:21               ` [PATCH v2] " Gary Benson
2016-02-19 15:38                 ` Luis Machado
2016-02-22 10:40                   ` Gary Benson
2016-02-22 11:37                     ` Luis Machado
2016-02-22 13:51                       ` Gary Benson
2016-02-22 22:00                         ` Luis Machado
2016-02-22 22:50                           ` Luis Machado
2016-02-22 23:00                             ` Pedro Alves
2016-02-23  0:04                               ` Luis Machado
2016-02-23  0:13                                 ` Pedro Alves
2016-02-23  0:16                                   ` Luis Machado
2016-02-23 11:27                                     ` Gary Benson [this message]
2016-02-23 11:43                                       ` Pedro Alves
2016-02-23 12:15                                         ` Gary Benson
2016-02-23 12:20                                           ` Pedro Alves
2016-02-23 11:55                 ` Pedro Alves
2016-02-24 11:56                   ` Gary Benson
2016-02-12 15:29 ` [PATCH] Remote debugging without a binary (regression) Pedro Alves
2016-02-12 16:08   ` Luis Machado
2016-02-12 16:36     ` Pedro Alves
2016-02-12 17:31       ` Luis Machado
2016-02-17 11:46         ` Pedro Alves
2016-02-18 12:30 ` Gary Benson
2016-02-18 12:40   ` Luis Machado

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=20160223112721.GA22369@blade.nx \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    --cc=palves@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).