Bug 11662 - agent expressions can't represent all DWARF locations
Summary: agent expressions can't represent all DWARF locations
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: unknown
: P2 normal
Target Milestone: 7.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 21:11 UTC by Tom Tromey
Modified: 2011-05-17 14:48 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 Tom Tromey 2010-06-02 21:11:33 UTC
It is difficult to translate all DWARF location expressions into
agent expressions.  This is true even for expressions which GCC
actually generates.

I think the best fix would be to add a few more opcodes to agent
expressions.

The difficult DWARF opcodes are enumerated here:

http://sourceware.org/ml/gdb-patches/2010-05/msg00407.html
Comment 1 Tom Tromey 2010-06-02 22:27:49 UTC
Also, DWARF does not have many restrictions on how an expression
can manipulate the stack.  For example, a DWARF expression may
push any number of values, while only the last value is used.
Branching can mean that the number of values on the stack at
any given point is not constant.

One simple way to deal with this problem would be to add new agent
opcodes to mark the stack depth and then pop to the mark.
Comment 2 Tom Tromey 2011-05-17 14:48:12 UTC
The DWARF->AX compiler also does not handle the typed DWARF extension.
See Bug 12617 for links.  At least integral types of various sizes
could be supported.