From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22830 invoked by alias); 11 Oct 2003 13:05:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22818 invoked from network); 11 Oct 2003 13:05:21 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 11 Oct 2003 13:05:21 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id h9BD5K4L000470 for ; Sat, 11 Oct 2003 15:05:20 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id h9BD5Kt4078958 for ; Sat, 11 Oct 2003 15:05:20 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id h9BD5JLE078955; Sat, 11 Oct 2003 15:05:19 +0200 (CEST) Date: Sat, 11 Oct 2003 13:05:00 -0000 Message-Id: <200310111305.h9BD5JLE078955@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH/RFA]: New architecture method: regset_from_core_section X-SW-Source: 2003-10/txt/msg00396.txt.bz2 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 * gdbarch.sh (regset_from_core_section): New method. (struct regset): Declare opaque. * gdbarch.c, gdbarch.h: Regenerated. Index: doc/ChangeLog from Mark Kettenis * 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