diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-10-19 15:06:10 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-10-24 17:01:04 +0100 |
commit | 368b8c325922ca329ae0edb1a9ce6bc16c9f927f (patch) | |
tree | 527730368084063c67f1f72268765d736d5d4358 /sim/ppc | |
parent | ffa2d048221147bad30dde3cfbcb535a824b203d (diff) | |
download | fsf-binutils-gdb-368b8c325922ca329ae0edb1a9ce6bc16c9f927f.zip fsf-binutils-gdb-368b8c325922ca329ae0edb1a9ce6bc16c9f927f.tar.gz fsf-binutils-gdb-368b8c325922ca329ae0edb1a9ce6bc16c9f927f.tar.bz2 |
sim/ppc: don't try to print an uninitialized variable
The ppc simulator, in sim_create_inferior, tries to print the function
local entry_point variable before the variable is initialized.
In this commit, I defer the debug print line until the variable has
been initialized.
Diffstat (limited to 'sim/ppc')
-rw-r--r-- | sim/ppc/sim_calls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index 729f6dc..3dcce19 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -161,8 +161,6 @@ sim_create_inferior (SIM_DESC sd, char * const *envp) { unsigned_word entry_point; - TRACE(trace_gdb, ("sim_create_inferior(start_address=0x%x, ...)\n", - entry_point)); if (simulator == NULL) error ("No program loaded"); @@ -172,6 +170,9 @@ sim_create_inferior (SIM_DESC sd, else entry_point = 0xfff00000; /* ??? */ + TRACE(trace_gdb, ("sim_create_inferior(start_address=0x%x, ...)\n", + entry_point)); + psim_init(simulator); psim_stack(simulator, argv, envp); |