aboutsummaryrefslogtreecommitdiff
path: root/gas/frags.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2004-01-23 12:52:20 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2004-01-23 12:52:20 +0000
commit0530d30a58dd8ba07c9f0b9ab30d11835d3fb7c3 (patch)
treef8c0b67aa01f5e2102d31fbcb037756c19da9d86 /gas/frags.c
parentfe3a9bc403bf629169b1ada02b8783e310037921 (diff)
downloadgdb-0530d30a58dd8ba07c9f0b9ab30d11835d3fb7c3.zip
gdb-0530d30a58dd8ba07c9f0b9ab30d11835d3fb7c3.tar.gz
gdb-0530d30a58dd8ba07c9f0b9ab30d11835d3fb7c3.tar.bz2
* frags.h (frag_room): Declare.
* frags.c (frag_room): New function. * doc/internals.texi: Document it.
Diffstat (limited to 'gas/frags.c')
-rw-r--r--gas/frags.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/frags.c b/gas/frags.c
index 1521d4b..83625d7 100644
--- a/gas/frags.c
+++ b/gas/frags.c
@@ -262,6 +262,14 @@ frag_wane (register fragS *fragP)
fragP->fr_var = 0;
}
+/* Return the number of bytes by which the current frag can be grown. */
+
+int
+frag_room (void)
+{
+ return obstack_room (&frchain_now->frch_obstack);
+}
+
/* Make an alignment frag. The size of this frag will be adjusted to
force the next frag to have the appropriate alignment. ALIGNMENT
is the power of two to which to align. FILL_CHARACTER is the