Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>
To: Tom Tromey <tom@tromey.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH] gdb/breakpoint: make a copy of the "commands" command's argument
Date: Wed, 16 Sep 2020 14:45:20 +0000	[thread overview]
Message-ID: <SN6PR11MB2893FFC8FA66BD05898E0833C4210@SN6PR11MB2893.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87o8m5aldy.fsf@tromey.com>

> >>>>> "Tankut" == Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Tankut> When GDB reads commands from the input, its internal buffer is re-used
> Tankut> for each line.
> 
> I wonder if this could be changed instead.

This sounds much reasonable, however I'm not able to comment on how hard or intrusive
it would be, particularly because it involves readline and you already recalled
it being hard.

> At least when reading from the user, a copy is already made.  For
> instance, readline returns an allocated string.
> 
> I recall thinking that this was hard for some reason, but I don't
> remember why any more :(
>
> Tankut> gdb/ChangeLog:
> Tankut> 2020-09-11  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
> 
> Tankut> 	* breakpoint.c (commands_command_1): Make a copy of the 'arg'
> Tankut> 	argument.
> 
> This is ok.  Thank you.

Thanks, I pushed the patch.
 
[from the second email]
> 
> I forgot to mention -- this seems like a good candidate to apply to the
> gdb 10 branch as well.
> 
> Tom

What is the policy for a release branch?  Should I simply cherry-pick the patch from
master and apply to the gdb-10 branch?

-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

  parent reply	other threads:[~2020-09-16 14:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  9:25 Tankut Baris Aktemur
2020-09-16 13:42 ` Tom Tromey
2020-09-16 13:43   ` Tom Tromey
2020-09-16 14:45   ` Aktemur, Tankut Baris [this message]
2020-09-25  7:59     ` Aktemur, Tankut Baris via Gdb-patches
2020-09-25 12:50       ` Tom Tromey
2020-09-25 16:13         ` Aktemur, Tankut Baris via Gdb-patches

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