Bug 30202 - GDB is incorrectly partially completing a command
Summary: GDB is incorrectly partially completing a command
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-06 15:00 UTC by Guinevere Larsen
Modified: 2023-03-06 15:00 UTC (History)
0 users

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 Guinevere Larsen 2023-03-06 15:00:47 UTC
Running the following code:

typedef int my_int;

template <class T>
class my_type{
    public:
        T member;
        my_type(T t): member(t) {};
};

int main(){
    my_type<my_int> mt(0);
    return mt.member;
}

and trying to complete "print my_type<int>::my" the line gets replaced by

(gdb) print my_type<int>::_type<int>

And if it can keep going indefinitely:

(gdb) print my_type<int>::my_type<int>::my_type<int>::my_type<int>::_type<int>