A gdb 4.17 patch for linux/x86

H.J. Lu hjl@lucon.org
Tue May 26 14:51:00 GMT 1998


> 
> According to H.J. Lu:
> > > hjl@lucon.org (H.J. Lu) writes:
> > > 
> > > > I will combine mine with that one.
> > > 
> > > Be careful, the copyright situation with Bill's patch isn't clear.
> > > 
> > 
> > What is Bill's copyright status?
> 
> They can be used under GPL.  I don't want to impede their use in gdb.
> I had a look at the copyright assignment stuff on cynus.com (I think)
> and was a little perplexed by it.  Either you assign a very specific
> patch for gdb to the FSF, or you assign everything you ever do in the
> future with gdb to the FSF.  The former seems to be very inefficient
> (I might want to offer several patches), and I don't want to commit
> myself in perpetuity for anything I might happen to do with gdb.  I
> should have followed this up further, but I haven't...
> 

I'd like to resolve it, at least your x87 patch can be used in the
official gdb.

In the meantime, I made a patch for gdb 4.17 to support FPU on
Linux/x86. Here is the ChangeLog. The source code patch and linux/x86
binaries are available at

ftp://ftp.yggdrasil.com/private/hjl/gdb-4.17.linux.diff.gz
ftp://ftp.yggdrasil.com/private/hjl/gdb-4.17.fpu.x86.bz2

I'd like to hear results on libc 5/linux 2.0.3x, libc 5/linux 2.1.xx,
glibc 2.0.x/linux 2.0.3x and glibc 2.0.x/linux 2.1.xx.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
---
Mon May 25 22:18:03 1998  H.J. Lu  <hjl@gnu.org>

	* breakpoint.c (VALUE_FIT_IN_REG): New.
	(can_use_hardware_watchpoint): Use it.

	* config/i386/linux.mh (NATDEPFILES): Remove i386v-nat.o
	i386v4-nat.o and add i386lnx-nat.o.

	* config/i386/nm-linux.h (FETCH_INFERIOR_REGISTERS): Defined.
	(NO_SYS_REG_H): Removed.
	(NO_PTRACE_H): undefined.
	Include <sys/user.h> if HAVE_SYS_REG_H is not defined.

	* config/i386/tm-i386.h (FPC_REGNUM): Defined as -1.
	(FPCWD_REGNUM, FPSWD_REGNUM, FPTWD_REGNUM, FPIPO_REGNUM,
	FPIPS_REGNUM, FPOOS_REGNUM, FPOPS_REGNUM): New.
	(INFO_REGMAP): New.
	(DO_REGISTERS_INFO_NUM_REGS): new.

	* config/i386/tm-linux.h (NUM_FREGS, NUM_REGS: New.
	(INFO_REGMAP): New.
	(DO_REGISTERS_INFO_NUM_REGS): New.
	(REGISTER_NAMES): New.
	(FP_REGNUM, SP_REGNUM, PS_REGNUM, PC_REGNUM, FP0_REGNUM,
	FPC_REGNUM, FPCWD_REGNUM, FPSWD_REGNUM, FPTWD_REGNUM,
	FPIPO_REGNUM, FPIPS_REGNUM, FPOOS_REGNUM, FPOPS_REGNUM): New.
	(GREGISTER_BYTES, gregister_set): New.
	(FPEGISTER_BYTES, fpregister_set): New.
	(REGISTER_BYTES): New.
	(REGISTER_BYTE): New.
	(VALUE_FIT_IN_REG): New.

	* configure.in (AC_CHECK_HEADERS): Add sys/reg.h.
	* configure: Regenerated.
	* config.in: Likewise.

	* i386-tdep.c (i386_print_status_word): New.

	* i386lnx-nat.c: New.

	* target.c (target_read_string): Handle partial read.

	Based on patch from Bill Metzenthen <billm@suburbia.ne>:
	* config/i386/tm-linux.h (I386_LINUX_TARGET): New.
	(MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): New.
	(TARGET_LONG_DOUBLE_BIT): New.
	(HEX_LONG_DOUBLE_INPUT): New.
	(REGISTER_CONVERTIBLE): New.
	(REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): New.
	(REGISTER_VIRTUAL_TYPE): New.
	(FLOAT_INFO): New.
	(DO_REGISTERS_INFO): New.

	* findvar.c (extract_floating): Also check
	TARGET_LONG_DOUBLE_BIT for long double.

	* i386-tdep.c (i386_extract_return_value): On Linux floating
	point values are returned in floating registers.
	(i386_do_registers_info): New.
	(i386_print_register): New.

	* i387-tdep.c (print_387_control_bits): Renamed from
	print_387_control_word.
	(print_387_status_bits: Renamed from print_387_status_word.
	(print_387_control_word): New.
	(print_387_status_word): New.
	(i387_print_register): New.
	(i387_float_info): New.
	(i387_hex_long_double_input): New.

	* valprint.c (print_floating): Handle TARGET_LONG_DOUBLE_BIT ==
	80.

Wed Feb 18 17:11:38 1998 Bill Metzenthen <billm@suburbia.ne>

	* c-exp.y (parse_number): Add long double support.

	* config/i386/xm-linux.h (HOST_I386): New.



More information about the Gdb mailing list