| Summary: | Empty function names since gdb 7.2 for functions in anonymous namespace | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Jens Elmenthaler <jens.elmenthaler> | ||||||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Marc-André Laperle <malaperle> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Marc Khouzam <marc.khouzam> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | cdtdoug, malaperle, pawel.1.piech | ||||||||
| Version: | 8.0 | ||||||||||
| Target Milestone: | 8.3.0 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Jens Elmenthaler
Created attachment 192175 [details]
Fix
Created attachment 212437 [details]
Improved fix
I think it would be nice to display (anonoumous namespace)::name() in the stack since the other namespaces get displayed. For example, if I change it from anonymous to Namespace, it displays Namespace::name(). What do you think? Created attachment 212524 [details]
Original fix
(In reply to comment #3) > I think it would be nice to display (anonoumous namespace)::name() in the stack > since the other namespaces get displayed. For example, if I change it from > anonymous to Namespace, it displays Namespace::name(). What do you think? This is what the original fix did. But there seems code around that assumes that the function names are valid symbol names. Parenthesis in namespace names break this assumption. One indicator of this assumption is that with the original patch, the label for functions in an anonymous namespace were shown like "(anonymous namespace)::name" while in ordinary namespaces you have "ns::name()" (note the trailing "()"). I see the following alternatives: 1) make the client code working with parenthesis in function names (= original patch + improvements in the clients). Would it be just parenthesis, or other puncutation characters as well? Where would I stop? 2) The MI layer returns valid function names. a) Just remove the anonymous namespace label from the function name, which ressults in the same behavior as pre-gdb-7.2 (= improved patch). b) replace "(anonymous namespace)" by something else, still yielding valid function names in C++. Not nice, because it shows function names that in fact don't exist. Hi Jens, now that we started using Gerrit, could you push your change there? Hopefully it will make the review faster: http://wiki.eclipse.org/CDT/git#Using_Gerrit_for_CDT Then put a link to the gerrit review in this bugzilla to correlate. Thanks! I finally managed to push it to Gerrit, please look at https://git.eclipse.org/r/#/c/7554/ I realized that CDI already had a fix for it and just copied it over. The fix has been merged into master. Thanks Jens! *** Bug 419912 has been marked as a duplicate of this bug. *** |