Rizin
unix-like reverse engineering framework and cli tools
signal.c File Reference
#include <rz_util.h>
#include <signal.h>
#include <stddef.h>

Go to the source code of this file.

Functions

RZ_API int rz_signal_from_string (const char *e)
 
RZ_API const char * rz_signal_to_string (int code)
 

Variables

struct {
   const char *   name
 
   int   code
 
signals []
 

Function Documentation

◆ rz_signal_from_string()

RZ_API int rz_signal_from_string ( const char *  e)

Definition at line 52 of file signal.c.

52  {
53  int i;
54  for (i = 1; signals[i].name; i++) {
55  const char *str = signals[i].name;
56  if (!strcmp(e, str)) {
57  return signals[i].code;
58  }
59  }
60  return atoi(e);
61 }
#define e(frag)
lzma_index ** i
Definition: index.h:629
static struct @333 signals[]

References e, i, signals, and cmd_descs_generate::str.

Referenced by rz_core_debug_kill(), and rz_run_parseline().

◆ rz_signal_to_string()

RZ_API const char* rz_signal_to_string ( int  code)

Definition at line 63 of file signal.c.

63  {
64  int i;
65  for (i = 1; signals[i].name; i++) {
66  if (signals[i].code == code) {
67  return signals[i].name;
68  }
69  }
70  return NULL;
71 }
#define NULL
Definition: cris-opc.c:27
Definition: inftree9.h:24

References i, NULL, and signals.

Referenced by handle_exception_message(), rz_cmd_debug(), rz_core_debug_kill(), rz_debug_continue_kill(), and rz_debug_wait().

Variable Documentation

◆ code

int code ( void  )

Definition at line 11 of file signal.c.

◆ name

const char* name

Definition at line 10 of file signal.c.

◆ 

struct { ... } signals[]