[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2021-03-11 Thread dhoyer at netapp dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #33 from David Hoyer --- (In reply to Paul Smith from comment #32) > No movement AFAIK. It's apparently the tip of a particularly gross iceberg. > It doesn't seem like partial measures appeal to people, and no one has the > needed

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2021-03-11 Thread psmith at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #32 from Paul Smith --- No movement AFAIK. It's apparently the tip of a particularly gross iceberg. It doesn't seem like partial measures appeal to people, and no one has the needed combination of time, knowledge, and contacts to

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2021-03-11 Thread dhoyer at netapp dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 David Hoyer changed: What|Removed |Added CC||dhoyer at netapp dot com --- Comment #31

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2020-04-29 Thread robert at ocallahan dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #30 from robert at ocallahan dot org --- (In reply to Xi Ruoyao from comment #27) > Yes. Could GDB search the symbol with linkage name? This might work for function names but if you're trying to look up a type name (e.g. for a

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2020-04-29 Thread robert at ocallahan dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 robert at ocallahan dot org changed: What|Removed |Added CC||robert at ocallahan dot

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2018-08-02 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #28 from Eric Gallager --- (In reply to Xi Ruoyao from comment #27) > (In reply to Jonathan Wakely from comment #26) > > The demangled names are not in a canonical/standardized format, or > > unambiguous, or portable between

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-09-01 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #27 from Xi Ruoyao --- (In reply to Jonathan Wakely from comment #26) > The demangled names are not in a canonical/standardized format, or > unambiguous, or portable between different compilers, so that isn't a > complete solution.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-09-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #26 from Jonathan Wakely --- The demangled names are not in a canonical/standardized format, or unambiguous, or portable between different compilers, so that isn't a complete solution.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-31 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #25 from Paul Smith --- > (1) Find the mangled name of the vtable of tv. > (2) Demangle the name, to be 'vtable for TreeVector::Tree'. > (3) Skip 'vtable for ' and get 'TreeVector::Tree'. > (4) Lookup this symbol.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-29 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #24 from Xi Ruoyao --- (In reply to Paul Smith from comment #23) > The lookup_type() was just to show the problem more clearly: I don't do that > in my actual Python code. This part (or something similar) is what I use: > > class

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-29 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #23 from Paul Smith --- The lookup_type() was just to show the problem more clearly: I don't do that in my actual Python code. This part (or something similar) is what I use: class tv(gdb.Function): def __init__(self):

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #22 from Martin Sebor --- Paul, have you considered determining the type of the specialization of the template from an object of one instead of hardcoding its name? I.e., instead of calling gdb.lookup_type("TreeVector

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #21 from Jonathan Wakely --- (In reply to Xi Ruoyao from comment #20) > (In reply to Martin Sebor from comment #18) > > GDB already has a C++ parser. It just isn't good enough. It understands > > that B and B are one and the same

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-29 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #20 from Xi Ruoyao --- (In reply to Martin Sebor from comment #18) > GDB already has a C++ parser. It just isn't good enough. It understands > that B and B are one and the same type but it > interprets A<2> and A<2u> as distinct.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-29 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #19 from Paul Smith --- Hi; is there a next step for this? I understand there's some concern that we should be asking GDB to improve their capabilities but in the meantime can we get GCC to emit the previous format? It would be

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #18 from Martin Sebor --- GDB already has a C++ parser. It just isn't good enough. It understands that B and B are one and the same type but it interprets A<2> and A<2u> as distinct. In my view, this is not just a limitation but a

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #17 from Xi Ruoyao --- (In reply to Martin Sebor from comment #15) > (In reply to Xi Ruoyao from comment #14) > > The symbols in your example are the result/ouput of demangling but the issue > reported here is with the symbols that

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #16 from Paul Smith --- I'm not familiar with the implementations but I'm not sure we can expect GDB to be able to handle this situation, at least not with any sort of efficiency. It's already a difficult part of GDB's job, looking

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #15 from Martin Sebor --- (In reply to Xi Ruoyao from comment #14) The symbols in your example are the result/ouput of demangling but the issue reported here is with the symbols that are input into GDB. There is more than one way

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #14 from Xi Ruoyao --- (In reply to Martin Sebor from comment #13) > (In reply to Xi Ruoyao from comment #11) > > The target demangler is (or can be) different on each target and, as I said, > different producers use different

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #13 from Martin Sebor --- (In reply to Xi Ruoyao from comment #11) The target demangler is (or can be) different on each target and, as I said, different producers use different strings (for example, neither Clang nor IBM XLC++

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #12 from Paul Smith --- Xi Ruoyao (comment #9): > This works for: Excellent.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #11 from Xi Ruoyao --- (In reply to Martin Sebor from comment #10) > Unless the exact format for non-type template arguments is specified in > DWARF (I don't think it is) it seems that a more robust solution is to > enhance GDB to be

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #10 from Martin Sebor --- Unless the exact format for non-type template arguments is specified in DWARF (I don't think it is) it seems that a more robust solution is to enhance GDB to be able to understand types with and without the

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #9 from Xi Ruoyao --- (In reply to Xi Ruoyao from comment #8) > I'll try more -gxxx options to see if we need a new flag. This works for: -g -g2 -g3 -ggdb -ggdb2 -ggdb3 -gdwarf -gdwarf-{2,3,4} -gdwarf -gstrict-dwarf -g -gz Not

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #8 from Xi Ruoyao --- (In reply to Paul Smith from comment #7) > I'm not sure what the impacts of "if (pp->flags & pp_c_flag_gnu_v3)" are; > does this mean it only works if you specify -ggdb3? Is that the right > thing? I don't

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #7 from Paul Smith --- I'm not sure what the impacts of "if (pp->flags & pp_c_flag_gnu_v3)" are; does this mean it only works if you specify -ggdb3? Is that the right thing? I don't know what the differences are between the

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #6 from Xi Ruoyao --- Created attachment 42038 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42038=edit patch proposal This patch turn on the type suffix of integer constants in debug info. It's not tested well yet.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #5 from Xi Ruoyao --- Martin said Clang doesn't output the suffix at all, so I tested Clang 4.0. It also suffers this warning.

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-24 Thread ryxi at stu dot xidian.edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 Xi Ruoyao changed: What|Removed |Added CC||msebor at gcc dot gnu.org,

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 Jonathan Wakely changed: What|Removed |Added Status|WAITING |UNCONFIRMED Ever confirmed|1

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-23 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #3 from Paul Smith --- Created attachment 42030 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42030=edit tv.py Test case attached. To run it: $ gcc -ggdb3 -o tvtest tvtest.cpp $ gdb tvtest -ex 'br 28' -ex 'source tv.py'

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-23 Thread psmith at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 --- Comment #2 from Paul Smith --- Created attachment 42029 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42029=edit tvtest.cpp

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information

2017-08-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|