* [PATCH] Prologue not set properly for binaries compiled with LLVM compiler (Bug #14419)
@ 2012-09-25 13:46 KARTHIKVENKATESH BHAT
2012-09-25 15:50 ` Joel Brobecker
0 siblings, 1 reply; 2+ messages in thread
From: KARTHIKVENKATESH BHAT @ 2012-09-25 13:46 UTC (permalink / raw)
To: gdb-patches
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=windows-1252, Size: 1667 bytes --]
Hi,
Please find the fix for Bug #14419 (http://sourceware.org/bugzilla/show_bug.cgi?id=14419). Prologue not set properly in case the binary is compiled with LLVM compiler.
Clang similar to gcc guarantees a line note before and after the prologue.
Extending GDB to support binaries compiled with LLVM so that prologue_end is set properly.
Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.14697
diff -u -p -r1.14697 ChangeLog
--- gdb/ChangeLog 25 Sep 2012 12:48:52 -0000 1.14697
+++ gdb/ChangeLog 25 Sep 2012 13:34:52 -0000
@@ -1,3 +1,7 @@
+2012-09-25 Karthik Bhat <kv.bhat@samsung.com>
+
+ * alpha-tdep.c (arm_skip_prologue): Extending support for LLVM compiler.
+
2012-09-25 Siddhesh Poyarekar <siddhesh@redhat.com>
* ada-valprint.c (ada_val_print_1): Eliminate single-use
Index: gdb/arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.367
diff -u -p -r1.367 arm-tdep.c
--- gdb/arm-tdep.c 22 Aug 2012 19:47:56 -0000 1.367
+++ gdb/arm-tdep.c 25 Sep 2012 13:34:54 -0000
@@ -1400,7 +1400,7 @@ arm_skip_prologue (struct gdbarch *gdbar
if (post_prologue_pc
&& (s == NULL
|| s->producer == NULL
- || strncmp (s->producer, "GNU ", sizeof ("GNU ") - 1) == 0))
+ || strncmp (s->producer, "GNU ", sizeof ("GNU ") - 1) == 0 || strncmp (s->producer, "clang ", sizeof ("clang ") - 1) == 0))
return post_prologue_pc;
if (post_prologue_pc != 0)
Thanks
Karthik\x16º&Öéj×!zÊÞ¶êç÷6êX¬µªÜ\a[¥«\
ë
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Prologue not set properly for binaries compiled with LLVM compiler (Bug #14419)
2012-09-25 13:46 [PATCH] Prologue not set properly for binaries compiled with LLVM compiler (Bug #14419) KARTHIKVENKATESH BHAT
@ 2012-09-25 15:50 ` Joel Brobecker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Brobecker @ 2012-09-25 15:50 UTC (permalink / raw)
To: KARTHIKVENKATESH BHAT; +Cc: gdb-patches
Karthik,
Thanks for the fix.
> +2012-09-25 Karthik Bhat <kv.bhat@samsung.com>
> +
> + * alpha-tdep.c (arm_skip_prologue): Extending support for LLVM compiler.
Wrong filename. The patch looks good and is OK to commit provided
you fix the formatting issue outlined below.
Do you have a copyright assignment on file? This patch is small enough
that it can be accepted without one, but if you are planing on
contributing more changes, having one would become necessary.
Let me know if you need to get started on the paperwork.
> Index: gdb/arm-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/arm-tdep.c,v
> retrieving revision 1.367
> diff -u -p -r1.367 arm-tdep.c
> --- gdb/arm-tdep.c 22 Aug 2012 19:47:56 -0000 1.367
> +++ gdb/arm-tdep.c 25 Sep 2012 13:34:54 -0000
> @@ -1400,7 +1400,7 @@ arm_skip_prologue (struct gdbarch *gdbar
> if (post_prologue_pc
> && (s == NULL
> || s->producer == NULL
> - || strncmp (s->producer, "GNU ", sizeof ("GNU ") - 1) == 0))
> + || strncmp (s->producer, "GNU ", sizeof ("GNU ") - 1) == 0 || strncmp (s->producer, "clang ", sizeof ("clang ") - 1) == 0))
Please move the addition || condition on the next line, properly aligned
with the others.
--
Joel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-25 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-25 13:46 [PATCH] Prologue not set properly for binaries compiled with LLVM compiler (Bug #14419) KARTHIKVENKATESH BHAT
2012-09-25 15:50 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox