Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH/RFA]: New architecture method: regset_from_core_section
Date: Sat, 11 Oct 2003 13:05:00 -0000	[thread overview]
Message-ID: <200310111305.h9BD5JLE078955@elgar.kettenis.dyndns.org> (raw)

This adds a new architecture method that returns a register set
definition based on the name and size of a core file section that we
get from BFD.  We had an eleborate discussion on this a while ago, and
in my opinion reached consesus on the approach, so I've checked the
code bits in.  Eli, are the doc bits OK?

The future might bring us regset_from_remote and perhaps
regset_from_ptrace_request.  We'll see.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* gdbarch.sh (regset_from_core_section): New method.
	(struct regset): Declare opaque.
	* gdbarch.c, gdbarch.h: Regenerated.

Index: doc/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* gdbint.texinfo (Target Architecture Definition): Document
	regset_from_core_section.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.276
diff -u -p -r1.276 gdbarch.sh
--- gdbarch.sh 11 Oct 2003 12:05:44 -0000 1.276
+++ gdbarch.sh 11 Oct 2003 12:40:40 -0000
@@ -747,6 +747,10 @@ M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int
 m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
 # Fetch the pointer to the ith function argument.
 F::FETCH_POINTER_ARGUMENT:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type
+
+# Return the appropriate register set for a core file section with
+# name SECT_NAME and size SECT_SIZE.
+M:::const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size
 EOF
 }
 
@@ -851,6 +855,7 @@ struct objfile;
 struct minimal_symbol;
 struct regcache;
 struct reggroup;
+struct regset;
 struct disassemble_info;
 
 extern struct gdbarch *current_gdbarch;
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.174
diff -u -p -r1.174 gdbint.texinfo
--- doc/gdbint.texinfo 10 Oct 2003 07:08:53 -0000 1.174
+++ doc/gdbint.texinfo 11 Oct 2003 12:40:47 -0000
@@ -3563,6 +3563,12 @@ Convert the value of register @var{reg} 
 form.
 @xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
 
+@item const struct regset *regset_from_core_section (struct gdbarch * @var{gdbarch}, const char * @var{sect_name}, size_t @var{sect_size})
+@findex regset_from_core_section
+Return the appropriate register set for a core file section with name
+SECT_NAME and size SECT_SIZE.
+
+
 @item RETURN_VALUE_ON_STACK(@var{type})
 @findex RETURN_VALUE_ON_STACK
 @cindex returning structures by value


             reply	other threads:[~2003-10-11 13:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-11 13:05 Mark Kettenis [this message]
2003-10-11 14:33 ` Andrew Cagney
2003-10-11 22:10   ` Mark Kettenis
2003-10-11 22:21     ` Andrew Cagney
2003-10-11 17:41 ` Eli Zaretskii
2003-10-18 12:31   ` Mark Kettenis

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=200310111305.h9BD5JLE078955@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.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