[Bug c++/33480] [gdb, c++] Gdb hang on "whatis std::string::npos" with prettyprinter

vries at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Wed Sep 24 11:23:33 GMT 2025


https://sourceware.org/bugzilla/show_bug.cgi?id=33480

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
@@ -165,7 +165,7 @@ inspect_type (struct demangle_parse_info *info,
        {
          const char *new_name = (*finder) (otype, data);

-         if (new_name != NULL)
+         if (new_name != NULL && strcmp (new_name, name) != 0)
            {
              ret_comp->u.s_name.s = new_name;
              ret_comp->u.s_name.len = strlen (new_name);
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list