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/357: value_of_register think-o bug



>Number:         357
>Category:       gdb
>Synopsis:       value_of_register think-o bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 12 22:38:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     ac131313@redhat.com
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
Hello,

findvar.c:value_of_register() contains:

  get_saved_register (raw_buffer, &optim, &addr,
              selected_frame, regnum, &lval);

  if (register_cached (regnum) < 0)
    return NULL;        /* register value not available */

I think the test for register_cached(regnum) is wrong.  The value returned from get_saved_register() may have been taken from the stack so checking the status of the cache isn't correct.

I guess I need to change get_saved_register() and a number of other things up the chain to return a register not-available indication.
>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]