Bug 15541

Summary: arguments printed in reverse order
Product: gdb Reporter: dje
Component: symtabAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jan
Priority: P2    
Version: HEAD   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description dje 2013-05-28 05:41:44 UTC
Found this while debugging something else.
Filing it so it's not forgotten.

bash$ gdb gdb
(top-gdb) b classify_inner_name
(top-gdb) r hello
(gdb) p ::main
Breakpoint 3, c_lex () at ../../src/gdb/c-exp.y:3051
3051              classification = classify_inner_name (search_block, context_type);
(top-gdb) bt 3
#0  c_lex () at ../../src/gdb/c-exp.y:3051
During symbol reading, incomplete CFI data; unspecified registers (e.g., rax) at 0x50efb0.
#1  c_parse_internal () at c-exp.c:2220
During symbol reading, cannot get low and high bounds for subprogram DIE at 5588382.
During symbol reading, Child DIE 0x554d33 and its abstract origin 0x55459e have different parents.
#2  0x00000000005123c6 in c_parse () at ../../src/gdb/c-exp.y:3145
(More stack frames follow...)
(top-gdb) s
classify_inner_name (context=<optimized out>, block=<optimized out>)
    at ../../src/gdb/c-exp.y:2929
2929      if (context == NULL)
(top-gdb) 

The arguments to classify_inner_name are printed in reverse order.

c-exp.y:
static int
classify_inner_name (const struct block *block, struct type *context)
{
  struct type *type;
  char *copy;
Comment 1 Jan Kratochvil 2013-05-28 05:51:06 UTC
The function is most probably inlined.

*** This bug has been marked as a duplicate of bug 15223 ***