mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-31 22:13:43 +00:00
* as.h (relax_substateT): Now defined to be unsigned int.
(relax_stateT): Separate typedef from enum definition. (enum _relax_state): Reordered for better punctuation. Added new values rs_align_code and rs_space. (lineno, struct lineno_struct): Unused, deleted. For friendlier assertion-failure messages: * as.h: No longer include assert.h. (as_assert): Declare. (assert): New definition, calls as_assert longer needed. (__PRETTY_FUNCTION__): Provide default for older versions of gcc. * messages.c (as_assert): New function. * gdbinit.in: Put a breakpoint there.
This commit is contained in:
parent
849515449b
commit
d5f4140317
50
gas/as.h
50
gas/as.h
@ -101,16 +101,23 @@ extern char *strdup (/* const char * */);
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined (__GNUC__) || __GNUC_MINOR__ <= 5
|
||||||
|
#define __PRETTY_FUNCTION__ ((char*)0)
|
||||||
|
#endif
|
||||||
|
#if 0
|
||||||
/* Handle lossage with assert.h. */
|
/* Handle lossage with assert.h. */
|
||||||
#ifndef BROKEN_ASSERT
|
#ifndef BROKEN_ASSERT
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#else /* BROKEN_ASSERT */
|
#else /* BROKEN_ASSERT */
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
#define assert(p) ((p) ? 0 : (abort(), 0))
|
#define assert(p) ((p) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
|
||||||
#else
|
#else
|
||||||
#define assert(p) ((p), 0)
|
#define assert(p) ((p), 0)
|
||||||
#endif
|
#endif
|
||||||
#endif /* BROKEN_ASSERT */
|
#endif /* BROKEN_ASSERT */
|
||||||
|
#else
|
||||||
|
#define assert(P) ((P) ? 0 : (as_assert (__FILE__, __LINE__, __PRETTY_FUNCTION__), 0))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Now GNU header files... */
|
/* Now GNU header files... */
|
||||||
@ -328,7 +335,7 @@ extern segT text_section, data_section, bss_section;
|
|||||||
|
|
||||||
/* relax() */
|
/* relax() */
|
||||||
|
|
||||||
typedef enum _relax_state
|
enum _relax_state
|
||||||
{
|
{
|
||||||
/* Variable chars to be repeated fr_offset times.
|
/* Variable chars to be repeated fr_offset times.
|
||||||
Fr_symbol unused. Used with fr_offset == 0 for a
|
Fr_symbol unused. Used with fr_offset == 0 for a
|
||||||
@ -338,22 +345,34 @@ typedef enum _relax_state
|
|||||||
/* Align: Fr_offset: power of 2. Variable chars: fill pattern. */
|
/* Align: Fr_offset: power of 2. Variable chars: fill pattern. */
|
||||||
rs_align,
|
rs_align,
|
||||||
|
|
||||||
|
/* Align code: fr_offset: power of 2. Fill pattern is machine
|
||||||
|
specific, defaulting to all zeros. */
|
||||||
|
rs_align_code,
|
||||||
|
|
||||||
/* Org: Fr_offset, fr_symbol: address. 1 variable char: fill
|
/* Org: Fr_offset, fr_symbol: address. 1 variable char: fill
|
||||||
character. */
|
character. */
|
||||||
rs_org,
|
rs_org,
|
||||||
|
|
||||||
rs_machine_dependent
|
|
||||||
|
|
||||||
#ifndef WORKING_DOT_WORD
|
#ifndef WORKING_DOT_WORD
|
||||||
/* JF: gunpoint */
|
/* JF: gunpoint */
|
||||||
, rs_broken_word
|
rs_broken_word,
|
||||||
#endif
|
#endif
|
||||||
} relax_stateT;
|
|
||||||
|
|
||||||
/* typedef unsigned char relax_substateT; */
|
/* machine-specific relaxable (or similarly alterable) instruction */
|
||||||
/* JF this is more likely to leave the end of a struct frag on an align
|
rs_machine_dependent,
|
||||||
boundry. Be very careful with this. */
|
|
||||||
typedef unsigned long relax_substateT;
|
/* .space directive with expression operand that needs to be computed
|
||||||
|
later. Similar to rs_org, but different.
|
||||||
|
fr_symbol: operand
|
||||||
|
1 variable char: fill character */
|
||||||
|
rs_space
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef enum _relax_state relax_stateT;
|
||||||
|
|
||||||
|
/* This type is used in prototypes, so it can't be a type that will be
|
||||||
|
widened for argument passing. */
|
||||||
|
typedef unsigned int relax_substateT;
|
||||||
|
|
||||||
/* Enough bits for address, but still an integer type.
|
/* Enough bits for address, but still an integer type.
|
||||||
Could be a problem, cross-assembling for 64-bit machines. */
|
Could be a problem, cross-assembling for 64-bit machines. */
|
||||||
@ -488,16 +507,6 @@ struct _pseudo_type
|
|||||||
|
|
||||||
typedef struct _pseudo_type pseudo_typeS;
|
typedef struct _pseudo_type pseudo_typeS;
|
||||||
|
|
||||||
#ifdef BFD_ASSEMBLER_xxx
|
|
||||||
struct lineno_struct
|
|
||||||
{
|
|
||||||
alent line;
|
|
||||||
fragS *frag;
|
|
||||||
struct lineno_struct *next;
|
|
||||||
};
|
|
||||||
typedef struct lineno_struct lineno;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Prefer varargs for non-ANSI compiler, since some will barf if the
|
/* Prefer varargs for non-ANSI compiler, since some will barf if the
|
||||||
ellipsis definition is used with a no-arguments declaration. */
|
ellipsis definition is used with a no-arguments declaration. */
|
||||||
#if defined (HAVE_VARARGS_H) && !defined (__STDC__)
|
#if defined (HAVE_VARARGS_H) && !defined (__STDC__)
|
||||||
@ -536,6 +545,7 @@ PRINTF_LIKE (as_tsktsk);
|
|||||||
PRINTF_LIKE (as_warn);
|
PRINTF_LIKE (as_warn);
|
||||||
PRINTF_WHERE_LIKE (as_bad_where);
|
PRINTF_WHERE_LIKE (as_bad_where);
|
||||||
PRINTF_WHERE_LIKE (as_warn_where);
|
PRINTF_WHERE_LIKE (as_warn_where);
|
||||||
|
void as_assert PARAMS ((const char *, int, const char *));
|
||||||
|
|
||||||
void fprint_value PARAMS ((FILE *file, addressT value));
|
void fprint_value PARAMS ((FILE *file, addressT value));
|
||||||
void sprint_value PARAMS ((char *buf, addressT value));
|
void sprint_value PARAMS ((char *buf, addressT value));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user