aboutsummaryrefslogtreecommitdiff
path: root/binutils/od-macho.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-10-18 17:36:11 +0800
committerYao Qi <yao@codesourcery.com>2013-12-10 20:27:49 +0800
commit0865b04a4dec8a458bee54081b5598a6268b0724 (patch)
tree7b2cdde0ecfc6456086735083c6a8b1a7ebb08dc /binutils/od-macho.c
parentf15cb84a84613a5017e41ae435312ddcb17877b5 (diff)
downloadgdb-0865b04a4dec8a458bee54081b5598a6268b0724.zip
gdb-0865b04a4dec8a458bee54081b5598a6268b0724.tar.gz
gdb-0865b04a4dec8a458bee54081b5598a6268b0724.tar.bz2
Use target_read_code in skip_prologue (i386)
GDB is able to cache memory accesses requested in target_read_code, so target_read_code is more efficient than general target_read_memory. This patch uses target_read_code and its variants to read target memory in the functions related to i386_skip_prologue. It improves the performance when doing 'b foo' (foo is a function) in remote debugging. Nowadays, when we set a breakpoint on function f1, GDB will fetch the code in f1 to determine the start of the function body (say skip the prologue), it requests read from target many times. With this patch applied, the number of RSP 'm' packets are reduced. gdb: 2013-12-10 Yao Qi <yao@codesourcery.com> * corefile.c (read_code): New function. (read_code_integer): New function. (read_code_unsigned_integer): New function. * gdbcore.h (read_code): Declare. (read_code_integer): Declare. (read_code_unsigned_integer): Declare. * i386-tdep.c (i386_follow_jump): Call target_read_code instead of target_read_memory. Call read_code_unsigned_integer instead of read_memory_unsigned_integer. (i386_analyze_struct_return): Likewise. (i386_skip_probe): Likewise. (i386_analyze_stack_align): Likewise. (i386_match_pattern): Likewise. (i386_skip_noop): Likewise. (i386_analyze_frame_setup): Likewise. (i386_analyze_register_saves): Likewise. (i386_skip_prologue): Likewise. (i386_skip_main_prologue): Likewise. (i386_frame_cache_1): Likewise.
Diffstat (limited to 'binutils/od-macho.c')
0 files changed, 0 insertions, 0 deletions