mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 20:49:43 +00:00
* gcc.patch: Update for a different GCC (G++) bug.
* main.c (print_gdb_version): Update copyright year to 1993. * nm-hp300bsd.h: Decide whether this is BSD 4.3 or 4.4, conditionalize this file on it. FIXME, right way is to split these into two config files. (ATTACH_DETACH): Define for BSD 4.4 (PTRACE_ARG_TYPE): caddr_t for BSD 4.4, unset for 4.3. (U_REGS_OFFSET): Revise for 4.4. (REGISTER_U_ADDR): Separate for 4.4, but it doesn't work yet. * xm-hp300bsd.h: Move definitions of UINT_MAX, INT_MAX, INT_MIN, LONG_MAX into this file to avoid cpp "redefinition" warnings.
This commit is contained in:
parent
b9163d1aaa
commit
5e3d0ab075
@ -4,6 +4,20 @@ Thu Feb 18 22:44:40 1993 Stu Grossman (grossman@cygnus.com)
|
||||
* am29k-tdep.c: More minor nits with arg types for
|
||||
supply_register, NULL vs. 0, read_register_gen, & reginv_com.
|
||||
|
||||
Thu Feb 18 22:38:03 1993 John Gilmore (gnu@cygnus.com)
|
||||
|
||||
* gcc.patch: Update for a different GCC (G++) bug.
|
||||
* main.c (print_gdb_version): Update copyright year to 1993.
|
||||
* nm-hp300bsd.h: Decide whether this is BSD 4.3 or 4.4,
|
||||
conditionalize this file on it. FIXME, right way is to split
|
||||
these into two config files.
|
||||
(ATTACH_DETACH): Define for BSD 4.4
|
||||
(PTRACE_ARG_TYPE): caddr_t for BSD 4.4, unset for 4.3.
|
||||
(U_REGS_OFFSET): Revise for 4.4.
|
||||
(REGISTER_U_ADDR): Separate for 4.4, but it doesn't work yet.
|
||||
* xm-hp300bsd.h: Move definitions of UINT_MAX, INT_MAX, INT_MIN,
|
||||
LONG_MAX into this file to avoid cpp "redefinition" warnings.
|
||||
|
||||
Thu Feb 18 16:13:28 1993 K. Richard Pixley (rich@rtl.cygnus.com)
|
||||
|
||||
* nm-hp300bsd.h (PTRACE_ARG3_TYPE): FSF's hp300's have int* not
|
||||
|
125
gdb/gcc.patch
125
gdb/gcc.patch
@ -1,63 +1,72 @@
|
||||
Recent versions of gcc have had a bug in how they emit debugging
|
||||
information for C++ methods (when using dbx-style stabs).
|
||||
This patch should fix the problem. Fix you can't fix gcc,
|
||||
you can alternatively define GCC_MANGLE_BUG when compling gdb/symtab.c.
|
||||
In the 2.3.2 release of gcc/g++, how the compiler handles resolving
|
||||
multiple inheritance lattices was reworked to properly discover
|
||||
ambiguities. We recently found an example which causes this new
|
||||
algorithm to fail in a very subtle way. For the time being, this
|
||||
patch will make the compiler use the old algorithm, which works for
|
||||
the failing case we've found. Note it will revert the compiler's
|
||||
ability to properly deduce MI ambiguities in many cases (to its state
|
||||
in 2.2.2 and 2.3.1). This bug will be fixed in the next gcc/g++
|
||||
release.
|
||||
|
||||
===================================================================
|
||||
RCS file: /rel/cvsfiles/devo/gcc/dbxout.c,v
|
||||
retrieving revision 1.53
|
||||
diff -c -r1.53 dbxout.c
|
||||
*** 1.53 1992/07/05 09:50:22
|
||||
--- dbxout.c 1992/07/09 07:00:33
|
||||
Brendan Kehoe (brendan@cygnus.com)
|
||||
|
||||
*** cp-search.c.~1~ Thu Feb 18 18:03:24 1993
|
||||
--- cp-search.c Thu Feb 18 18:03:27 1993
|
||||
***************
|
||||
*** 683,688 ****
|
||||
--- 683,689 ----
|
||||
tree type_encoding;
|
||||
register tree fndecl;
|
||||
register tree last;
|
||||
+ char formatted_type_identifier_length[16];
|
||||
register int type_identifier_length;
|
||||
*** 2389,2392 ****
|
||||
--- 2389,2393 ----
|
||||
if ((*qfn)(base_binfo))
|
||||
{
|
||||
+ #if 0
|
||||
if (fn == dfs_init_vbase_pointers)
|
||||
{
|
||||
***************
|
||||
*** 2464,2467 ****
|
||||
--- 2465,2469 ----
|
||||
saw_first_vbase = save_saw_first_vbase;
|
||||
} else
|
||||
+ #endif
|
||||
dfs_walk (base_binfo, fn, qfn);
|
||||
}
|
||||
*************** dfs_init_vbase_pointers (binfo)
|
||||
*** 2658,2661 ****
|
||||
--- 2660,2664 ----
|
||||
return;
|
||||
|
||||
if (methods == NULL_TREE)
|
||||
***************
|
||||
*** 711,716 ****
|
||||
--- 712,719 ----
|
||||
+ #if 0
|
||||
this_vbase_ptr = vbase_decl_ptr_intermediate;
|
||||
|
||||
type_identifier_length = IDENTIFIER_LENGTH (type_encoding);
|
||||
*************** dfs_init_vbase_pointers (binfo)
|
||||
*** 2662,2668 ****
|
||||
if (TYPE_POINTER_TO (type) != TREE_TYPE (this_vbase_ptr))
|
||||
my_friendly_abort (125);
|
||||
|
||||
+ sprintf(formatted_type_identifier_length, "%d", type_identifier_length);
|
||||
+
|
||||
if (TREE_CODE (methods) == FUNCTION_DECL)
|
||||
fndecl = methods;
|
||||
else if (TREE_VEC_ELT (methods, 0) != NULL_TREE)
|
||||
***************
|
||||
*** 754,762 ****
|
||||
--- 757,769 ----
|
||||
if (debug_name[0] == '_' && debug_name[1] == '_')
|
||||
{
|
||||
char *method_name = debug_name + 2;
|
||||
+ char *length_ptr = formatted_type_identifier_length;
|
||||
/* Get past const and volatile qualifiers. */
|
||||
while (*method_name == 'C' || *method_name == 'V')
|
||||
method_name++;
|
||||
+ /* Skip digits for length of type_encoding. */
|
||||
+ while (*method_name == *length_ptr && *length_ptr)
|
||||
+ length_ptr++, method_name++;
|
||||
if (! strncmp (method_name,
|
||||
IDENTIFIER_POINTER (type_encoding),
|
||||
type_identifier_length))
|
||||
***************
|
||||
*** 768,775 ****
|
||||
--- 775,786 ----
|
||||
else if (debug_name[0] == '_' && debug_name[1] == '_')
|
||||
{
|
||||
char *ctor_name = debug_name + 2;
|
||||
+ char *length_ptr = formatted_type_identifier_length;
|
||||
while (*ctor_name == 'C' || *ctor_name == 'V')
|
||||
ctor_name++;
|
||||
+ /* Skip digits for length of type_encoding. */
|
||||
+ while (*ctor_name == *length_ptr && *length_ptr)
|
||||
+ length_ptr++, ctor_name++;
|
||||
if (!strncmp (IDENTIFIER_POINTER (type_encoding), ctor_name,
|
||||
type_identifier_length))
|
||||
debug_name = ctor_name + type_identifier_length;
|
||||
- #if 0
|
||||
distance = get_base_distance (type, TREE_TYPE (vbase_decl), 0, &path);
|
||||
if (distance == -2)
|
||||
{
|
||||
--- 2665,2672 ----
|
||||
if (TYPE_POINTER_TO (type) != TREE_TYPE (this_vbase_ptr))
|
||||
my_friendly_abort (125);
|
||||
+ #endif
|
||||
|
||||
distance = get_base_distance (type, TREE_TYPE (vbase_decl), 0, &path);
|
||||
+ #if 0
|
||||
if (distance == -2)
|
||||
{
|
||||
*************** dfs_init_vbase_pointers (binfo)
|
||||
*** 2669,2672 ****
|
||||
--- 2673,2677 ----
|
||||
error ("inheritance lattice too complex below");
|
||||
}
|
||||
+ #endif
|
||||
while (path)
|
||||
{
|
||||
*************** dfs_init_vbase_pointers (binfo)
|
||||
*** 2682,2685 ****
|
||||
--- 2687,2691 ----
|
||||
this_vbase_ptr = convert_pointer_to (type, vbase_decl_ptr);
|
||||
|
||||
+ #if 0
|
||||
/* This happens when it is ambiguous. */
|
||||
if (this_vbase_ptr == error_mark_node)
|
||||
|
@ -17,6 +17,60 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* This is a hack. This is only a hack. Were this a common source file,
|
||||
rather than a config file specific to BSD on HP 68k's, you would have
|
||||
been instructed to clean this up. As it is, clean it up if FSF's
|
||||
HP's-running-ancient-BSD ever go away. */
|
||||
|
||||
#include <errno.h>
|
||||
#ifdef EPROCUNAVAIL
|
||||
/* BSD 4.4 alpha or better */
|
||||
|
||||
/* We can attach to processes using ptrace. */
|
||||
|
||||
#define ATTACH_DETACH
|
||||
#define PTRACE_ATTACH 10
|
||||
#define PTRACE_DETACH 11
|
||||
|
||||
/* The third argument of ptrace is declared as this type. */
|
||||
|
||||
#define PTRACE_ARG3_TYPE caddr_t
|
||||
|
||||
/* U_REGS_OFFSET is the offset of the registers within the u area for
|
||||
ptrace purposes. */
|
||||
#define U_REGS_OFFSET \
|
||||
ptrace (PT_READ_U, inferior_pid, \
|
||||
(PTRACE_ARG3_TYPE) \
|
||||
(offsetof (struct user, u_kproc.kp_proc.p_md.md_regs)), 0) \
|
||||
- USRSTACK
|
||||
|
||||
/* This is a piece of magic that is given a register number REGNO
|
||||
and as BLOCKEND the address in the system of the end of the user structure
|
||||
and stores in ADDR the address in the kernel or core dump
|
||||
of that register. */
|
||||
|
||||
#define REGISTER_U_ADDR(addr, blockend, regno) \
|
||||
{ \
|
||||
if (regno < PS_REGNUM) \
|
||||
addr = (int) &((struct frame *)(blockend))->f_regs[regno]; \
|
||||
else if (regno == PS_REGNUM) \
|
||||
addr = (int) &((struct frame *)(blockend))->f_stackadj; \
|
||||
else if (regno == PC_REGNUM) \
|
||||
addr = (int) &((struct frame *)(blockend))->f_pc; \
|
||||
else if (regno < FPC_REGNUM) \
|
||||
addr = (int) \
|
||||
&((struct user *)0)->u_pcb.pcb_fpregs.fpf_regs[((regno)-FP0_REGNUM)*3];\
|
||||
else if (regno == FPC_REGNUM) \
|
||||
addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpcr; \
|
||||
else if (regno == FPS_REGNUM) \
|
||||
addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpsr; \
|
||||
else \
|
||||
addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpiar; \
|
||||
}
|
||||
#else
|
||||
|
||||
/* THIS IS BSD 4.3 or something like it. */
|
||||
|
||||
/* This is a piece of magic that is given a register number REGNO
|
||||
and as BLOCKEND the address in the system of the end of the user structure
|
||||
and stores in ADDR the address in the kernel or core dump
|
||||
@ -40,24 +94,4 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
else \
|
||||
addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpiar; \
|
||||
}
|
||||
|
||||
/* This is a hack. This is only a hack. Were this a common source file,
|
||||
rather than a config file specific to BSD on HP 68k's, you would have
|
||||
been instructed to clean this up. As it is, clean it up if FSF's
|
||||
HP's-running-ancient-BSD ever go away. */
|
||||
|
||||
#include <errno.h>
|
||||
#ifdef EPROCUNAVAIL
|
||||
/* BSD 4.4 alpha or better */
|
||||
|
||||
/* We can attach to processes using ptrace. */
|
||||
|
||||
#define ATTACH_DETACH
|
||||
#define PTRACE_ATTACH 10
|
||||
#define PTRACE_DETACH 11
|
||||
|
||||
/* The third argument of ptrace is declared as this type. */
|
||||
|
||||
#define PTRACE_ARG3_TYPE caddr_t
|
||||
#endif
|
||||
|
||||
|
@ -25,10 +25,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#define HOST_BYTE_ORDER BIG_ENDIAN
|
||||
|
||||
/* Avoid "INT_MIN redefined" warnings -- by defining it here, exactly
|
||||
the same as in the system <machine/machtypes.h> file. */
|
||||
#undef INT_MIN
|
||||
#define INT_MIN 0x80000000
|
||||
/* Avoid "INT_MIN redefined" preprocessor warnings -- by defining them here,
|
||||
exactly the same as in the system <limits.h> file. */
|
||||
#define UINT_MAX 4294967295 /* max value for an unsigned int */
|
||||
#define INT_MAX 2147483647 /* max value for an int */
|
||||
#define INT_MIN (-2147483647-1) /* min value for an int */
|
||||
#define LONG_MAX 2147483647 /* max value for a long */
|
||||
|
||||
/* Get rid of any system-imposed stack limit if possible. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user