public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>
To: Pedro Alves <palves@redhat.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH v5 1/5] gdb: protect some 'regcache_read_pc' calls
Date: Mon, 20 Apr 2020 20:13:34 +0000	[thread overview]
Message-ID: <SN6PR11MB2893B5C9DA732811726C4C1CC4D40@SN6PR11MB2893.namprd11.prod.outlook.com> (raw)
In-Reply-To: <4359d573-cb6c-639f-1784-853b76097e31@redhat.com>

On Thursday, April 16, 2020 6:12 PM Pedro Alves wrote:
> On 4/6/20 4:45 PM, Tankut Baris Aktemur via Gdb-patches wrote:
> 
> > --- a/gdb/regcache.c
> > +++ b/gdb/regcache.c
> > @@ -1220,6 +1220,24 @@ regcache_read_pc (struct regcache *regcache)
> >    return pc_val;
> >  }
> >
> > +/* See gdbsupport/common-regcache.h.  */
> > +
> > +CORE_ADDR
> > +regcache_read_pc_protected (regcache *regcache)
> > +{
> > +  CORE_ADDR pc;
> > +  try
> > +    {
> > +      pc = regcache_read_pc (regcache);
> > +    }
> > +  catch (const gdb_exception &ex)
> 
> This swallows Ctrl-C/QUIT, which is usually not a good idea.
> Let's default to catching gdb_exception_error instead.

I replaced gdb_exception with gdb_exception_error.  I'm not sending another revision
for this.

Thanks.
Baris


 

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2020-04-20 20:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 15:45 [PATCH v5 0/5] Handling already-exited threads in 'stop_all_threads' Tankut Baris Aktemur
     [not found] ` <cover.1586187408.git.tankut.baris.aktemur@intel.com>
2020-04-06 15:45   ` [PATCH v5 1/5] gdb: protect some 'regcache_read_pc' calls Tankut Baris Aktemur
2020-04-16 16:11     ` Pedro Alves
2020-04-20 20:13       ` Aktemur, Tankut Baris [this message]
2020-04-06 15:45   ` [PATCH v5 2/5] gdb/infrun: move a 'regcache_read_pc' call down to first use Tankut Baris Aktemur
2020-04-16 16:12     ` Pedro Alves
2020-04-06 15:45   ` [PATCH v5 3/5] gdb/remote: do not delete a thread if it has a pending event Tankut Baris Aktemur
2020-04-16 16:24     ` Pedro Alves
2020-04-20 20:35       ` Aktemur, Tankut Baris
2020-04-21 18:54         ` Pedro Alves
2020-04-22 14:57           ` Aktemur, Tankut Baris
2020-04-06 15:45   ` [PATCH v5 4/5] gdb/infrun: extract out a code piece into 'mark_non_executing_threads' function Tankut Baris Aktemur
2020-04-16 16:24     ` Pedro Alves
2020-04-06 15:45   ` [PATCH v5 5/5] gdb/infrun: handle already-exited threads when attempting to stop Tankut Baris Aktemur
2020-04-16 17:06     ` Pedro Alves
2020-04-20 20:43       ` Aktemur, Tankut Baris

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=SN6PR11MB2893B5C9DA732811726C4C1CC4D40@SN6PR11MB2893.namprd11.prod.outlook.com \
    --to=tankut.baris.aktemur@intel.com \
    --cc=gdb-patches@sourceware.org \
    --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).