Rizin
unix-like reverse engineering framework and cli tools
xml.h File Reference
#include "libgdbr.h"

Go to the source code of this file.

Functions

int gdbr_read_target_xml (libgdbr_t *g)
 
int gdbr_read_processes_xml (libgdbr_t *g, int pid, RzList *list)
 

Function Documentation

◆ gdbr_read_processes_xml()

int gdbr_read_processes_xml ( libgdbr_t g,
int  pid,
RzList list 
)

Definition at line 474 of file xml.c.

474  {
475  if (!g->stub_features.qXfer_features_read) {
476  return -1;
477  }
478  ut64 len;
479  int ret = -1;
480  char *data;
481 
482  if (!(data = gdbr_read_osdata(g, "processes", &len))) {
483  ret = -1;
484  goto end;
485  }
486 
487  if (gdbr_parse_processes_xml(g, data, len, pid, list) != 0) {
488  ret = -1;
489  goto end;
490  }
491 
492  ret = 0;
493 end:
494  if (data) {
495  free(data);
496  }
497  return ret;
498 }
size_t len
Definition: 6502dis.c:15
struct @667 g
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
static void list(RzEgg *egg)
Definition: rz-gg.c:52
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
Definition: sflib.h:64
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static char * gdbr_read_osdata(libgdbr_t *g, const char *file, ut64 *tot_len)
Definition: xml.c:109
static int gdbr_parse_processes_xml(libgdbr_t *g, char *xml_data, ut64 len, int pid, RzList *list)
Definition: xml.c:362

References test_evm::end, free(), g, gdbr_parse_processes_xml(), gdbr_read_osdata(), len, list(), pid, and ut64().

Referenced by gdbr_pids_list().

◆ gdbr_read_target_xml()

int gdbr_read_target_xml ( libgdbr_t g)

Definition at line 460 of file xml.c.

460  {
461  if (!g->stub_features.qXfer_features_read) {
462  return -1;
463  }
464  char *data;
465  ut64 len;
466  if (!(data = gdbr_read_feature(g, "target.xml", &len))) {
467  return -1;
468  }
469  gdbr_parse_target_xml(g, data, len);
470  free(data);
471  return 0;
472 }
static char * gdbr_read_feature(libgdbr_t *g, const char *file, ut64 *tot_len)
Definition: xml.c:15
static int gdbr_parse_target_xml(libgdbr_t *g, char *xml_data, ut64 len)
Definition: xml.c:175

References free(), g, gdbr_parse_target_xml(), gdbr_read_feature(), len, and ut64().

Referenced by gdbr_connect(), and gdbr_connect_lldb().