Bug 15541 - arguments printed in reverse order
Summary: arguments printed in reverse order
Status: RESOLVED DUPLICATE of bug 15223
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 05:41 UTC by dje
Modified: 2013-05-28 05:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***