On 4/20/26 1:28 PM, Andrew Burgess wrote:
@@ -1288,13 +1290,13 @@ find_frame_funname (const frame_info_ptr &frame, enum language *funlang,
 	     stored in the symbol table, but we stored a version
 	     with DMGL_PARAMS turned on, and here we don't want to
 	     display parameters.  So remove the parameters.  */
-	  funname = cp_remove_params (print_name);
+	  funname = cp_remove_params (print_name.c_str ());
Does this work?  The PRINT_NAME will have the namepsace prefix in place,
but doesn't cp_remove_params parse the name as a C++ symbol, so will
this correctly find and remove the parameters?

I haven't looked at the earlier versions, but I have a suspicion that
this might be me causing problems, as I think originally you were adding
the namespace-id as a prefix, and I pushed you to write
print_name_with_namespace.

Anyway, I think you should write a test to cover this case (C++ symbol
in a namespace) and see if this works, if not, then you might need to go
back to something more like your original approach, adding the namespace
prefix.

You're correct, this does not work. However, I thought about it some more, and I think this is the wrong place to make this change anyway. I don't think we want to say that the function *name* includes the prefix.

So instead, I added a function that calculates and returns the identifier, then identified the callers that print the name directly, and made them call the function. This way, also, the python symbol.name and the guile equivalent won't be polluted by the linker namespace.


 	}
 
       /* If we didn't hit the C++ case above, set *funname
 	 here.  */
       if (funname == NULL)
-	funname.reset (xstrdup (print_name));
+	funname.reset (xstrdup (print_name.c_str ()));
     }
   else
     {
This 'else' block looks up the funname via lookup_minimal_symbol_by_pc,
but doesn't add the namespace-id.  If we had code without debug in a
namespace, I think this is the path it would take, should we not be
displaying the id in this case?

This might be a good new test to add.

Now that print_frame is calling it, instead of find_frame_funname, I don't think the existence of debug symbols no longer matters, so I won't be adding this test case, as it is redundant. v8 should be arriving on the list soon enough

-- 
Cheers,
Guinevere Larsen
It/she