This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/11] Add MIPS_MAX_REGISTER_SIZE (4/4)


On Fri, 9 Jun 2017, Pedro Alves wrote:

> > I’ve avoided using variable-length arrays because it has the potential to
> > break the stack.
> > However, here we know that we aren’t going to get a value >8, so maybe in
> > this case a VLA would be ok?
> > 
> > Anyone else have an opinion here?
> 
> VLAs are not standard C++, unfortunately.  Do we know whether all compilers
> we care about support them?  It doesn't seem worth it to me to rely
> on compiler extensions when we know we're always going to see a size <=8.

 Hmm, `alloca' then?  It used to be used here actually, up till commit 
d9d9c31f3130 ("MAX_REGISTER_RAW_SIZE -> MAX_REGISTER_SIZE"), 
<https://sourceware.org/ml/gdb-patches/2003-05/msg00127.html>.

  Maciej


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]