Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
845f7e2b
Commit
845f7e2b
authored
Mar 15, 2011
by
Matthias Braun
Browse files
bedbgout: improve function names, ensure that the end of compilation unit thing is actually called
parent
d9f5e57b
Changes
5
Hide whitespace changes
Inline
Side-by-side
ir/be/be_dbgout.h
View file @
845f7e2b
...
...
@@ -35,11 +35,11 @@ void be_dbg_open(void);
/** close a debug handler. */
void
be_dbg_close
(
void
);
/** start a
new source object (
compilation unit
)
*/
void
be_dbg_
so
(
const
char
*
filename
);
/** start a compilation unit */
void
be_dbg_
unit_begin
(
const
char
*
filename
);
/**
Main program
*/
void
be_dbg_
main_program
(
void
);
/**
end compilation unit
*/
void
be_dbg_
unit_end
(
void
);
/** debug for a method begin */
void
be_dbg_method_begin
(
const
ir_entity
*
ent
);
...
...
ir/be/be_dbgout_t.h
View file @
845f7e2b
...
...
@@ -41,11 +41,11 @@ typedef struct debug_ops {
/** close the stabs handler. */
void
(
*
close
)(
dbg_handle
*
handle
);
/** start a
new source object (
compilation unit
)
*/
void
(
*
so
)(
dbg_handle
*
handle
,
const
char
*
filename
);
/** start a compilation unit */
void
(
*
unit_begin
)(
dbg_handle
*
handle
,
const
char
*
filename
);
/**
Main Program
*/
void
(
*
main_program
)(
dbg_handle
*
handle
);
/**
end compilation unit
*/
void
(
*
unit_end
)(
dbg_handle
*
handle
);
/** dumps the stabs for a method begin */
void
(
*
method_begin
)(
dbg_handle
*
handle
,
const
ir_entity
*
ent
);
...
...
ir/be/bedbgout.c
View file @
845f7e2b
...
...
@@ -38,16 +38,16 @@ void be_dbg_close(void)
handle
->
ops
->
close
(
handle
);
}
void
be_dbg_
so
(
const
char
*
filename
)
void
be_dbg_
unit_begin
(
const
char
*
filename
)
{
if
(
handle
->
ops
->
so
)
handle
->
ops
->
so
(
handle
,
filename
);
if
(
handle
->
ops
->
unit_begin
)
handle
->
ops
->
unit_begin
(
handle
,
filename
);
}
void
be_dbg_
main_program
(
void
)
void
be_dbg_
unit_end
(
void
)
{
if
(
handle
->
ops
->
main_program
)
handle
->
ops
->
main_program
(
handle
);
if
(
handle
->
ops
->
unit_end
)
handle
->
ops
->
unit_end
(
handle
);
}
void
be_dbg_method_begin
(
const
ir_entity
*
ent
)
...
...
ir/be/bemain.c
View file @
845f7e2b
...
...
@@ -511,7 +511,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
be_init_env
(
&
env
,
file_handle
);
env
.
cup_name
=
cup_name
;
be_dbg_
so
(
cup_name
);
be_dbg_
unit_begin
(
cup_name
);
be_dbg_types
();
arch_env
=
env
.
arch_env
;
...
...
@@ -800,6 +800,9 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
be_free_birg
(
irg
);
stat_ev_ctx_pop
(
"bemain_irg"
);
}
be_dbg_unit_end
();
ir_profile_free
();
be_done_env
(
&
env
);
...
...
ir/be/bestabs.c
View file @
845f7e2b
...
...
@@ -625,27 +625,24 @@ static void gen_types(stabs_handle *h)
/**
* start a new source object (compilation unit)
*/
static
void
stabs_
so
(
dbg_handle
*
handle
,
const
char
*
filename
)
static
void
stabs_
unit_begin
(
dbg_handle
*
handle
,
const
char
*
filename
)
{
stabs_handle
*
h
=
(
stabs_handle
*
)
handle
;
h
->
main_file
=
h
->
curr_file
=
filename
;
be_emit_irprintf
(
"
\t
.stabs
\t\"
%s
\"
,%d,0,0,%stext0
\n
"
,
filename
,
N_SO
,
be_gas_get_private_prefix
());
be_emit_write_line
();
}
/* stabs_so */
}
/**
* Main Program
*/
static
void
stabs_main_program
(
dbg_handle
*
handle
)
static
void
stabs_unit_end
(
dbg_handle
*
handle
)
{
ir_graph
*
irg
=
get_irp_main_irg
();
(
void
)
handle
;
if
(
irg
)
{
be_emit_irprintf
(
"
\t
.stabs
\t\"
%s
\"
,%d,0,0,0
\n
"
,
get_entity_name
(
get_irg_entity
(
irg
)),
N_MAIN
);
be_emit_write_line
();
ir_entity
*
entity
=
get_irg_entity
(
irg
);
be_emit_irprintf
(
"
\t
.stabs
\t\"
%s
\"
,%d,0,0,0
\n
"
,
get_entity_ld_name
(
entity
),
N_MAIN
);
}
}
/* stabs_main_program */
}
static
void
stabs_set_dbg_info
(
dbg_handle
*
h
,
dbg_info
*
dbgi
)
{
...
...
@@ -852,8 +849,8 @@ static void stabs_close(dbg_handle *handle)
/** The stabs operations. */
static
const
debug_ops
stabs_ops
=
{
stabs_close
,
stabs_
so
,
stabs_
main_program
,
stabs_
unit_begin
,
stabs_
unit_end
,
stabs_method_begin
,
stabs_method_end
,
stabs_types
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment