Bug 480678 - tcf agent support for DW_CFA_GNU_window_save
Summary: tcf agent support for DW_CFA_GNU_window_save
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: Other All
: P3 normal (vote)
Target Milestone: 1.4   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-26 12:22 EDT by Samuel Ghinet CLA
Modified: 2016-03-18 08:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Ghinet CLA 2015-10-26 12:22:34 EDT
Hello,

Looking into agent/tcf/services/dwarfframe.c, we can see:

527    default:
528        switch (op >> 6) {
529        case 0:
530            str_exception(ERR_INV_DWARF, "Unsupported instruction in Call Frame Information");
531            break;

I am having the situation that, I have a frame extension - DW_CFA_GNU_window_save - which is not supported by tcf. I think it would be a good idea if the agent exposed some interface (perhaps, some callbacks) so that the debuggers could handle themselves the extended opcodes. It would be preferable to hacking into the agent.

I also found a list of dwarf extensions here, if it may be of any help:
https://fedorahosted.org/elfutils/wiki/DwarfExtensions

Thanks,
Samuel
Comment 1 Eugene Tarassov CLA 2015-10-27 16:02:58 EDT
Adding callbacks would also require to expose internal data structures of dwarfframe.c. It can get complicated. In this case, it is much easier to add support for DW_CFA_GNU_window_save.

I've added the support. Let me know if it works - I have no way to test it.

BTW, full support for Sparc will, probably, require few more changes like this.