Skip to content

Commit

Permalink
Use code cache in aarch64 prologue analyzer
Browse files Browse the repository at this point in the history
This patch change aarch prologue analyzer using code cache, in order
to improve the performance of remote debugging.

gdb.perf/skip-prologue.exp (measured by wall-time) is improved when
the program is compiled without debug information.

			Original	Patched		Original	Patched
			without dbg	without dbg	with dbg	with dbg

/			11.1635239124	9.99472999573	9.65339517593	9.66648793221
-fstack-protector-all	11.2560930252	9.338118	9.63896489143	9.59474396706

gdb:

2016-12-9  Yao Qi  <[email protected]>

	* aarch64-tdep.c (instruction_reader::read): Call
	read_code_unsigned_integer instead of
	read_memory_unsigned_integer.
  • Loading branch information
Yao Qi committed Dec 9, 2016
1 parent 198cd59 commit fc2f703
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions gdb/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2016-12-09 Yao Qi <[email protected]>

* aarch64-tdep.c (instruction_reader::read): Call
read_code_unsigned_integer instead of
read_memory_unsigned_integer.

2016-12-09 Yao Qi <[email protected]>

* arm-tdep.c (skip_prologue_function): Call
Expand Down
2 changes: 1 addition & 1 deletion gdb/aarch64-tdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class instruction_reader : public abstract_instruction_reader
public:
ULONGEST read (CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
{
return read_memory_unsigned_integer (memaddr, len, byte_order);
return read_code_unsigned_integer (memaddr, len, byte_order);
}
};

Expand Down

0 comments on commit fc2f703

Please sign in to comment.