PATCH: Add type_sprint() function to return type in string form

Daniel Jacobowitz drow@mvista.com
Tue Apr 22 20:22:00 GMT 2003


On Tue, Apr 22, 2003 at 04:16:26PM -0400, Andrew Cagney wrote:
> 
> >>Sure, but the interface would sux.
> >
> >
> >Then what would you prefer?  I have a really negative gut reaction to
> >putting dup in the name; it's not duplicating anything. 
> >type_as_string?
> 
> It is making an xmalloc'ed string duplicate of the type.

A duplicate is the same as the original.

A string is not the same as a type.

> Jason, your choice:
> 
> 	type_xasprint (char **buf, ...)
> 
> or
> 
> 	char *type_xstrdup (....);
> 
> Andrew
> 
> 
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list