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: [RFC/TileGX 4/6]use skip_prologue_using_sal for skipping prologue



---
  gdb/tilegx-tdep.c |   22 +++++++++++-----------
  1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index 638be6c..7f36bed 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -731,28 +731,28 @@ tilegx_analyze_prologue (struct gdbarch* gdbarch,
/* This is the implementation of gdbarch method skip_prologue. */
static CORE_ADDR
-tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
+tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
This is not an objection, but IMO "start_pc" is more confusing
than "pc". I would have understood better the change if it was
done to match the name used in the gdbarch_skip_prologue_ftype,
but there it uses "ip" (which, frankly, isn't great either).
This is highly subjective, so feel free to ignore.

+      CORE_ADDR post_prologue_pc
+        = skip_prologue_using_sal (gdbarch, func_start);
+      if (post_prologue_pc != 0)
+        return max (start_pc, post_prologue_pc);
Can you add an empty line between the variable declarations,
and the rest of the code? (this is a GDB coding convention).
fixed.

    return tilegx_analyze_prologue (gdbarch,
-				  pc, pc + 8 * TILEGX_BUNDLE_SIZE_IN_BYTES,
+                                  start_pc,
+                                  start_pc + 8 * TILEGX_BUNDLE_SIZE_IN_BYTES,
The indentation should be done using tabs first, and then spaces
if necessary. Again, a GDB convention.

thanks for point out. fixed.
(my vim configured to replace tab to whitespace automatically ..., becaues I think tab may
be displayed into different width, depends on the user's editor configuration)


is the updated patch OK?


Thanks,

Attachment: 04-revise.patch
Description: Text document


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