Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338730 - [tracepoints][postmortem] GDB does not like that we set the binary after we set the trace file
Summary: [tracepoints][postmortem] GDB does not like that we set the binary after we s...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-02 15:32 EST by Marc Khouzam CLA
Modified: 2011-05-19 16:23 EDT (History)
3 users (show)

See Also:
marc.khouzam: review? (pawel.1.piech)


Attachments
Fix that does not remove old API (9.19 KB, patch)
2011-05-18 10:57 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Fix that removes old API (15.06 KB, patch)
2011-05-18 11:00 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-03-02 15:32:06 EST
For multi-process I reworked the launch sequence to modularize behavior.  From what I had tested, with postmortem debugging, GDB allowed to set the binary after the core/trace file.

Trying it in more detail for a trace file, I saw that GDB couldn't not locate the source code unless we specify the binary first.  At least with GDB 7.2

I'll have to try it with a core file also.
Comment 1 Marc Khouzam CLA 2011-05-18 06:52:26 EDT
After trying it again, what I see is that for the first tracepoint that we look at, GDB does not show the stack details so we don't see the source code.  However, when we look at the next tracepoint, things are ok, and when we go back to the first tracepoint, things are still ok.
Comment 2 Marc Khouzam CLA 2011-05-18 10:57:34 EDT
Created attachment 195984 [details]
Fix that does not remove old API

I think it is safer to set the executable before setting the core/trace file in a postmortem situation.  That seems to be what GDB expects.
Comment 3 Marc Khouzam CLA 2011-05-18 11:00:03 EDT
Created attachment 195985 [details]
Fix that removes old API

This is the same solution but it removes the API that won't be used.  I prefer this solution but it is late in the cycle, so I've emailed the list for opinions.
Comment 4 Marc Khouzam CLA 2011-05-19 16:11:45 EDT
(In reply to comment #3)
> Created attachment 195985 [details]
> Fix that removes old API
> 
> This is the same solution but it removes the API that won't be used.  I prefer
> this solution but it is late in the cycle, so I've emailed the list for
> opinions.

No objection from the list, so I committed this patch.

Pawel, can you review?  It is just a move of code from one file to another.