Comment 2 for bug 1030813

Revision history for this message
karthik (kv-bhat) wrote :

Hi Michael,
Thanks for your reply. Yes as you suggested the code flow is going into fallback as the check in
file - arm-tdep.c
function - arm_skip_prologue-

if (post_prologue_pc
   && (s == NULL
       || s->producer == NULL
       || strncmp (s->producer, "GNU ", sizeof ("GNU ") - 1) == 0)
return post_prologue_pc;

Fails for clang/LLVM generated binary as as s->producer will not be "GNU".

We wanted to add support for clang/LLVM in Linaro GDB. Since clang also generates line note before prologue and another after as in case of GCC we can take advantage of the same and skip prologue sequence checking.

We can extend the code above to support clang by-

if (post_prologue_pc
   && (s == NULL
       || s->producer == NULL
       || strncmp (s->producer, "GNU ", sizeof ("GNU ") - 1) == 0 || strncmp (s->producer, "clang", sizeof ("clang") - 1) == 0))
return post_prologue_pc;

We wanted input from community if we can push this patch through to the trunk.

Awaiting response.
Thanks.