This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [8/9] multiple locations
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 8 Sep 2007 15:55:00 +0400
> Cc: gdb-patches@sources.redhat.com
>
> > > + if (part_of_multiple)
> > > + {
> > > + char buf[30];
> >
> > Why 30? GNU coding standards frown on arbitrary constant sizes.
> >
> > > + sprintf (buf, "%d.%d", b->number, loc_number);
>
> Clearly, '30' is sufficient for 2^32 breakpoints, each having 2^32 locations.
Are we talking only about 32-bit machines?
> I don't think using variable-size buffer is going to have any difference.
I thought more about the lines of xsnprintf or some similar function,
which removes the need to worry about these issues.