Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>,
	Ulrich Weigand <uweigand@de.ibm.com>
Cc: David Edelsohn <edelsohn@us.ibm.com>, gdb-patches@sourceware.org
Subject: Re: gcore support for AIX
Date: Wed, 18 Oct 2017 10:14:00 -0000	[thread overview]
Message-ID: <94423fdc-c014-db28-9b05-712d50e87a40@redhat.com> (raw)
In-Reply-To: <OF0FB27DEE.C04E1BD5-ON652581BD.003116A6-652581BD.00353CEB@notes.na.collabserv.com>

On 10/18/2017 10:41 AM, Sangamesh Mallayya wrote:

>> Some comments on the patch itself:
>>
>>> +#if (GDB_OSABI_DEFAULT == GDB_OSABI_AIX)
>>
>> We really try to avoid this type of #ifdef conditional code.  Platform-
>> specific code should be encapsulated into target callback routines.
>> There are already some of those related to gcore.  If those do not
>> suffice to implement this feature on AIX, they should be extended
>> or new ones added.  The actual implementation can then be provided in
>> rs6000-nat.c
>>
> Thanks for pointing this out.
> Best possible solution here to add gcore support for AIX is to implement 
> it the way it was done for other platforms instead of using gencore 
> command/API.
> And platform changes should go into the rs600-nat.c files.
> 

+1000.

> Idea here is just to make gdb continue it's execution after executing 
> single instruction.
> I think waiting on gencore process completion can be also possible and can 
> be done that way too. 

Even if you make sure to only run one instruction, that is still
undesirable, because by running an instruction you're altering
the state of the program that you want to dump core.  That
instruction may well corrupt the inferior, or kill it...  That's
extremely surprising for users that are dumping core exactly to
save state _because_ they've determined that the program just
gotten into a messed up state that they want to be able to analyze
again [state which may be hard to reproduce].

I'd really really prefer if AIX implemented core support by making
gdb/bfd themselves create the core dump.

Thanks,
Pedro Alves


      reply	other threads:[~2017-10-18 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 10:58 Sangamesh Mallayya
2017-10-17 10:11 ` Ulrich Weigand
2017-10-18  9:41   ` Sangamesh Mallayya
2017-10-18 10:14     ` Pedro Alves [this message]

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=94423fdc-c014-db28-9b05-712d50e87a40@redhat.com \
    --to=palves@redhat.com \
    --cc=edelsohn@us.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=uweigand@de.ibm.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