This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/476: read_register_bytes -> read_registers(buf, regnum, num_regs)



>Number:         476
>Category:       gdb
>Synopsis:       read_register_bytes -> read_registers(buf, regnum, num_regs)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 08 08:28:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     ac131313@redhat.com
>Release:        2002-04-08
>Organization:
>Environment:

>Description:
(I assume everyone knows about the problems of read_register_bytes.)

It is used in several ways:
- to save the raw register buffer during inferior function calls (blockframe.c, ...)
- to extract adjacent registers for things like struct passing (valops.c)

Suggest replacing the second with a new function that returns NR_BYTES starting with register REGNUM and then incrementing REGNUM.  It uses get_saved_register() and register_virtual_type() et.al.

Suggest, as an interum step, replacing the first with a regnum iterator that lists the registers to be saved/restored.  Default is [0..NUM_REGS).
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]