This is the mail archive of the gdb-patches@sources.redhat.com 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: ChangeLog entry, re: gdb-5.2 and SCO OpenServer 5.0.5


On Aug 16,  6:18pm, william@nscs.fast.net wrote:

> How is this:
> 
> 2002-08-16  William Bader  <william@nscs.fast.net>
> 
> 	* gdb/i386-tdep.c: Dynamically allocate buf;
> 	TARGET_PTR_BIT is not a constant.
> 
> --- gdb-5.2/gdb/i386-tdep.c-	Tue Feb 19 13:42:27 2002
> +++ gdb-5.2/gdb/i386-tdep.c	Fri Aug 16 18:13:00 2002
> @@ -858,7 +858,7 @@
>  int
>  get_longjmp_target (CORE_ADDR *pc)
>  {
> -  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
> +  char *buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
>    CORE_ADDR sp, jb_addr;
>  
>    sp = read_register (SP_REGNUM);

The patch looks good.  If it were me doing the ChangeLog entry,
I'd probably do it something like this:

	* i386-tdep.c (get_longjmp_target): Dynamically allocate ``buf''
	since TARGET_PTR_BIT is not a constant.

Or perhaps just:

	* i386-tdep.c (get_longjmp_target): Dynamically allocate ``buf''.

I just took a look at the current development sources and it looks to
me like this patch won't apply cleanly.  FWIW, the current development
sources don't use TARGET_PTR_BIT anymore (in the ``buf'' declaration)
so we're probably okay.

Kevin


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