This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC][1/2] Rework value_from_register
- From: Jim Blandy <jimb at codesourcery dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, drow at false dot org
- Date: Thu, 04 Jan 2007 12:48:56 -0800
- Subject: Re: [RFC][1/2] Rework value_from_register
- References: <200612081550.kB8FoueU011723@d12av02.megacenter.de.ibm.com>
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> ChangeLog:
>
> * frame.c (get_frame_register_bytes): New function.
> (put_frame_register_bytes): Likewise.
> * frame.h (get_frame_register_bytes): Declare.
> (put_frame_register_bytes): Likewise.
> * findvar.c (value_from_register): Always construct lval_register
> values. Use get_frame_register_bytes.
> * valops.c (value_assign): Use get_frame_register_bytes and
> put_frame_register_bytes.
This looks great. Tested without regressions on IA-32 Fedora Core 6.
One suggestion: common practice seems to put detailed explanations of
functions' interfaces in frame.h, and place no comment above the
definition in frame.c. I think it's better to have one full
explanation, instead of two that can get out of sync.