This is the mail archive of the 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]

[RFA] Use data cache for stack accesses

This is the second half of the pair of patches I first submitted last
week. Differences from the first pass are:

- Added a NEWS entry for the new option
- Changed the stackcache option to default to on, rather than off
- Got rid of the unnecessary new value_at_lazy_stack() function
- Flush the cache when switching inferiors.

I haven't changed the new read_stack function to take a target_ops,
since it's intended to be consistent with read_memory(); converting
read_memory() to take target_ops would be out of the scope of this
patch (it and target_read_memory have a *lot* of callers). Other than
that, I think I've addressed all the issues with the first pass; is
there anything else to fix?


- Jacob

2009-07-08  Jacob Potter  <>

        * NEWS: Add description of stackcache option.
        * corefile.c (read_stack): New helper for stack reads.
        * gdbcore.h (read_stack): Declare.
        * dcache.c (dcache_enabled_p, remotecache_enabled_p): Rename
        dcache_enabled_p to remotecache_enabled_p.
        (stack_cache_enabled_p): New flag.
        (show_dcache_enabled_p): Change for use with stack cache flag.
        (show_remotecache_enabled_p): New function.
        (_initialize_dcache): Rewrite flag documentation; add new flag.
        * dwarf2loc.c (dwarf2_evaluate_loc_desc): Mark value as stack.
        * frame-unwind.c (frame_unwind_got_memory): Mark value as stack.
        * target.c (memory_xfer_partial): Add a target_object parameter
        to indicate the type of access; use dcache for stack.
        (target_read_stack): New helper for stack reads.
        * target.h (enum target_object): Add TARGET_OBJECT_STACK_MEMORY.
        (target_read_stack): Declare.
        * thread.c (switch_to_thread): Flush cache when pid changes.
        * valops.c (get_value_at): Refactor common code from value_at()
        and value_at_lazy() into new helper function.
        (value_fetch_lazy): Read from stack when necessary.
        * value.c (struct value): Add new field "stack" for values on
        the stack.
        (value_stack, set_value_stack): New accessors.
        * value.h (value_stack, set_value_stack): Declare.

Attachment: part2-use-cache-for-stack.patch.txt
Description: Text document

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