This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [PATCH V2 2/2] Prologue: Add selftests to x64/x32 architecture.


On 20/12/2016 10:20, Yao Qi wrote:
On 16-12-16 14:58:36, Bernhard Heckel wrote:
+
+class code_reader : public abstract_code_reader
+{
+public:
+  code_reader (void)
+  {
+    target_memory = 1;
+  }
+
+  void read (CORE_ADDR memaddr, gdb_byte *buffer, ssize_t len)
+  {
+    read_code (memaddr, buffer, len);
Can we use target_read_code here?  It doesn't throw an error if it
can't read.  Method 'read' becomes

int read (CORE_ADDR memaddr, gdb_byte *buffer, ssize_t len)

so that we may even share more code with disassembly.  See Pedro's
POC patch.

Can you point me to the Pedro's patch?


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

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