summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beemitter.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-04-24 20:42:40 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2012-04-24 20:51:56 +0200
commitc7311e9112a4b5addacdc3de37be4b43b17908df (patch)
tree95f92ee8cfe279b61289558a663f4f017067b0a2 /ir/be/beemitter.c
parent7eb9592b75afa78475ceec1625ce2a67b805efbf (diff)
Add the column to the debug information.
Diffstat (limited to 'ir/be/beemitter.c')
-rw-r--r--ir/be/beemitter.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/ir/be/beemitter.c b/ir/be/beemitter.c
index 9b2d6a0..ae35cfb 100644
--- a/ir/be/beemitter.c
+++ b/ir/be/beemitter.c
@@ -100,8 +100,7 @@ void be_emit_pad_comment(void)
void be_emit_finish_line_gas(const ir_node *node)
{
dbg_info *dbg;
- const char *sourcefile;
- unsigned lineno;
+ src_loc_t loc;
if (node == NULL) {
be_emit_char('\n');
@@ -113,11 +112,16 @@ void be_emit_finish_line_gas(const ir_node *node)
be_emit_cstring("/* ");
be_emit_irprintf("%+F ", node);
- dbg = get_irn_dbg_info(node);
- sourcefile = ir_retrieve_dbg_info(dbg, &lineno);
- if (sourcefile != NULL) {
- be_emit_string(sourcefile);
- be_emit_irprintf(":%u", lineno);
+ dbg = get_irn_dbg_info(node);
+ loc = ir_retrieve_dbg_info(dbg);
+ if (loc.file) {
+ be_emit_string(loc.file);
+ if (loc.line != 0) {
+ be_emit_irprintf(":%u", loc.line);
+ if (loc.column != 0) {
+ be_emit_irprintf(":%u", loc.column);
+ }
+ }
}
be_emit_cstring(" */\n");
be_emit_write_line();