aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in2.h
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-02-27 23:45:18 +0000
committerStan Shebs <shebs@codesourcery.com>1994-02-27 23:45:18 +0000
commitfdfe2d146613e37c909be73c5ef87e3a96490daa (patch)
tree7b8871b771df1b7cf8d587abd443b3c1ae70dac7 /bfd/bfd-in2.h
parent4c8d6c9f4f5ee90a766c6e711828d37f75efc3c7 (diff)
downloadgdb-fdfe2d146613e37c909be73c5ef87e3a96490daa.zip
gdb-fdfe2d146613e37c909be73c5ef87e3a96490daa.tar.gz
gdb-fdfe2d146613e37c909be73c5ef87e3a96490daa.tar.bz2
Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
* targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that check all the pointer dereferences. Enabled via DEBUG_BFD_SEND. * bfd-in2.h: Rebuilt.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r--bfd/bfd-in2.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 20ce0d5..294b0a9 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -756,6 +756,12 @@ typedef struct sec
discarded. */
#define SEC_DEBUGGING 0x10000
+ /* The contents of this section are held in memory pointed to
+ by the contents field. This is checked by
+ bfd_get_section_contents, and the data is retrieved from
+ memory if appropriate. */
+#define SEC_IN_MEMORY 0x20000
+
/* End of section flags. */
/* The virtual memory address of the section - where it will be
@@ -835,7 +841,9 @@ typedef struct sec
PTR userdata;
- struct lang_output_section *otheruserdata;
+ /* If the SEC_IN_MEMORY flag is set, this points to the actual
+ contents. */
+ unsigned char *contents;
/* Attached line number information */
@@ -1924,8 +1932,24 @@ core_file_matches_executable_p
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
+
+#ifdef DEBUG_BFD_SEND
+#undef BFD_SEND
+#define BFD_SEND(bfd, message, arglist) \
+ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
+ ((*((bfd)->xvec->message)) arglist) : \
+ (bfd_assert (__FILE__,__LINE__), NULL))
+#endif
#define BFD_SEND_FMT(bfd, message, arglist) \
(((bfd)->xvec->message[(int)((bfd)->format)]) arglist)
+
+#ifdef DEBUG_BFD_SEND
+#undef BFD_SEND_FMT
+#define BFD_SEND_FMT(bfd, message, arglist) \
+ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
+ (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \
+ (bfd_assert (__FILE__,__LINE__), NULL))
+#endif
enum bfd_flavour {
bfd_target_unknown_flavour,
bfd_target_aout_flavour,