[RISU,v5,06/13] risu: a bit more verbosity when starting

Message ID 20170619104655.31104-7-alex.bennee@linaro.org
State New
Headers show
Series
  • RISU record/replay patches
Related show

Commit Message

Alex Bennée June 19, 2017, 10:46 a.m.
When debugging faults it is useful to know where the generated
instructions are living.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>


--
v5
  - dropped all the status update due to signal handler contraints
v3
  - use portable fmt string for image_start_address
  - include arm dumping position
---
 risu.c | 4 ++++
 risu.h | 3 +++
 2 files changed, 7 insertions(+)

-- 
2.13.0

Comments

Peter Maydell June 20, 2017, 1:33 p.m. | #1
On 19 June 2017 at 11:46, Alex Bennée <alex.bennee@linaro.org> wrote:
> When debugging faults it is useful to know where the generated

> instructions are living.

>

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

>

> --


Separator should be '---'.

> v5

>   - dropped all the status update due to signal handler contraints

> v3

>   - use portable fmt string for image_start_address

>   - include arm dumping position

> ---

>  risu.c | 4 ++++

>  risu.h | 3 +++

>  2 files changed, 7 insertions(+)

>

> diff --git a/risu.c b/risu.c

> index 2cd6d22..a10422a 100644

> --- a/risu.c

> +++ b/risu.c

> @@ -124,6 +124,8 @@ int master(int sock)

>      }

>      master_socket = sock;

>      set_sigill_handler(&master_sigill);

> +    fprintf(stderr, "starting master image at 0x%"PRIxPTR"\n",

> +            image_start_address);

>      fprintf(stderr, "starting image\n");

>      image_start();

>      fprintf(stderr, "image returned unexpectedly\n");

> @@ -134,6 +136,8 @@ int apprentice(int sock)

>  {

>      apprentice_socket = sock;

>      set_sigill_handler(&apprentice_sigill);

> +    fprintf(stderr, "starting apprentice image at 0x%"PRIxPTR"\n",

> +            image_start_address);

>      fprintf(stderr, "starting image\n");

>      image_start();

>      fprintf(stderr, "image returned unexpectedly\n");

> diff --git a/risu.h b/risu.h

> index 3fbeda8..78a7313 100644

> --- a/risu.h

> +++ b/risu.h

> @@ -37,6 +37,7 @@ extern uintptr_t image_start_address;

>  extern void *memblock;

>

>  extern int test_fp_exc;

> +extern int ismaster;

>

>  /* Ops code under test can request from risu: */

>  #define OP_COMPARE 0

> @@ -72,6 +73,8 @@ int recv_and_compare_register_info(int sock, void *uc);

>   */

>  int report_match_status(void);

>

> +void report_test_status(void *pc);

> +

>  /* Interface provided by CPU-specific code: */

>

>  /* Move the PC past this faulting insn by adjusting ucontext

> --


Stray extra changes here ?

thanks
-- PMM

Patch hide | download patch | download mbox

diff --git a/risu.c b/risu.c
index 2cd6d22..a10422a 100644
--- a/risu.c
+++ b/risu.c
@@ -124,6 +124,8 @@  int master(int sock)
     }
     master_socket = sock;
     set_sigill_handler(&master_sigill);
+    fprintf(stderr, "starting master image at 0x%"PRIxPTR"\n",
+            image_start_address);
     fprintf(stderr, "starting image\n");
     image_start();
     fprintf(stderr, "image returned unexpectedly\n");
@@ -134,6 +136,8 @@  int apprentice(int sock)
 {
     apprentice_socket = sock;
     set_sigill_handler(&apprentice_sigill);
+    fprintf(stderr, "starting apprentice image at 0x%"PRIxPTR"\n",
+            image_start_address);
     fprintf(stderr, "starting image\n");
     image_start();
     fprintf(stderr, "image returned unexpectedly\n");
diff --git a/risu.h b/risu.h
index 3fbeda8..78a7313 100644
--- a/risu.h
+++ b/risu.h
@@ -37,6 +37,7 @@  extern uintptr_t image_start_address;
 extern void *memblock;
 
 extern int test_fp_exc;
+extern int ismaster;
 
 /* Ops code under test can request from risu: */
 #define OP_COMPARE 0
@@ -72,6 +73,8 @@  int recv_and_compare_register_info(int sock, void *uc);
  */
 int report_match_status(void);
 
+void report_test_status(void *pc);
+
 /* Interface provided by CPU-specific code: */
 
 /* Move the PC past this faulting insn by adjusting ucontext