aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJames E Wilson <wilson@specifixinc.com>2005-07-26 02:56:44 +0000
committerJim Wilson <wilson@gcc.gnu.org>2005-07-25 19:56:44 -0700
commit3e2844cb07459014e55308e43ec26dd75e280f30 (patch)
tree21c55286c5bc2b5af118cad52bc71fa46c46a004 /gcc/tree.h
parentdd4f41c3775d2d554849efffc0cd5ef7e806d4a1 (diff)
downloadgcc-3e2844cb07459014e55308e43ec26dd75e280f30.zip
gcc-3e2844cb07459014e55308e43ec26dd75e280f30.tar.gz
gcc-3e2844cb07459014e55308e43ec26dd75e280f30.tar.bz2
Better debug info for inlined functions.
* dwarf2out.c (add_call_src_coords_attributes): New. (gen_inlined_subroutine_die): Call it. (maybe_emit_file, init_file_table): Add comments. (prune_unused_types_walk_attribs): Pass DW_AT_call_file through maybe_emit_file. * tree-inline.c (remap_block): Copy BLOCK_SOURCE_LOCATION. (expand_call_inline): Set BLOCK_SOURCE_LOCATION. * tree.h (BLOCK_SOURCE_LOCATION): New. (struct tree_block): New field locus. From-SVN: r102379
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index df730a5..cae0c8b 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1570,6 +1570,12 @@ struct varray_head_tag;
#define BLOCK_FRAGMENT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.fragment_origin)
#define BLOCK_FRAGMENT_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.fragment_chain)
+/* For an inlined function, this gives the location where it was called
+ from. This is only set in the top level block, which corresponds to the
+ inlined function scope. This is used in the debug output routines. */
+
+#define BLOCK_SOURCE_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.locus)
+
struct tree_block GTY(())
{
struct tree_common common;
@@ -1584,6 +1590,7 @@ struct tree_block GTY(())
tree abstract_origin;
tree fragment_origin;
tree fragment_chain;
+ location_t locus;
};
/* Define fields and accessors for nodes representing data types. */