Fix multidex and open_many loading using proper base address (#2104)

This commit is contained in:
Giovanni 2021-12-18 09:54:42 +01:00 committed by GitHub
parent b1c3595c6b
commit bd7854d297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 200 additions and 161 deletions

View file

@ -5,6 +5,7 @@
#include <stdlib.h>
#include <string.h>
#include "core_private.h"
#include "core_private_base.h"
#define UPDATE_TIME(a) (r->times->file_open_time = rz_time_now_mono() - (a))
@ -882,25 +883,36 @@ static bool map_multi_dex(RzCore *core, RzIODesc *desc, ut32 id) {
if (!rz_str_endswith(desc->name, ".dex")) {
return true;
}
RzCoreFile *cf = rz_core_file_cur(core);
// adds the current size and aligns next address
ut64 base_address = RZ_CORE_BASE_ADDRESS_DEX;
RzBinFile *cur = rz_pvector_empty(&cf->binfiles) ? NULL : rz_pvector_tail(&cf->binfiles);
if (cur) {
RzIODesc *iod = rz_io_desc_get(core->io, cur->fd);
if (iod) {
base_address = cur->loadaddr;
base_address += rz_io_desc_size(iod);
rz_core_align_base_address(base_address);
}
}
ut64 size = rz_io_desc_size(desc);
ut64 baddr = rz_io_map_next_available(core->io, 0x200000, size, 0x100000);
RZ_LOG_INFO("Mapping %s at 0x%" PFMT64x " with size 0x%" PFMT64x "\n", desc->name, baddr, size);
if (baddr != UT64_MAX) {
RzCoreFile *cf = rz_core_file_cur(core);
rz_io_use_fd(core->io, desc->fd);
RzBinOptions opt;
rz_core_bin_options_init(core, &opt, desc->fd, baddr, 0);
opt.xtr_idx = 0;
RzBinFile *binfile = rz_bin_open_io(core->bin, &opt);
if (!binfile) {
RZ_LOG_ERROR("Cannot load bin file %s.\n", desc->name);
return true;
}
RZ_LOG_INFO("Mapping at 0x%08" PFMT64x " with size 0x08%" PFMT64x " %s\n", base_address, size, desc->name);
rz_pvector_push(&cf->binfiles, binfile);
rz_core_bin_apply_all_info(core, binfile);
rz_io_use_fd(core->io, desc->fd);
RzBinOptions opt;
rz_core_bin_options_init(core, &opt, desc->fd, base_address, 0);
opt.xtr_idx = 0;
RzBinFile *binfile = rz_bin_open_io(core->bin, &opt);
if (!binfile) {
RZ_LOG_ERROR("Cannot load bin file %s.\n", desc->name);
return true;
}
binfile->loadaddr = base_address;
rz_pvector_push(&cf->binfiles, binfile);
rz_core_bin_apply_all_info(core, binfile);
return true;
}
@ -1092,7 +1104,7 @@ RZ_API bool rz_core_bin_load(RZ_NONNULL RzCore *r, RZ_NULLABLE const char *filen
*
* Calls rz_io_open_many and maps all the file descriptors to an RzCoreFile
*/
RZ_API RZ_BORROW RzCoreFile *rz_core_file_open_many(RZ_NONNULL RzCore *r, RZ_NULLABLE const char *file, int perm, ut64 loadaddr) {
RZ_API RZ_BORROW RzCoreFile *rz_core_file_open_many(RZ_NONNULL RzCore *r, RZ_NULLABLE const char *file, int perm, ut64 base_address) {
RzList *list_fds = rz_io_open_many(r->io, file, perm, 0644);
if (rz_list_empty(list_fds)) {
@ -1100,6 +1112,10 @@ RZ_API RZ_BORROW RzCoreFile *rz_core_file_open_many(RZ_NONNULL RzCore *r, RZ_NUL
return NULL;
}
if (!base_address) {
base_address = RZ_CORE_BASE_ADDRESS_DEFAULT;
}
RzListIter *it = NULL;
RzIODesc *desc = NULL;
RzIODesc *first = NULL;
@ -1117,9 +1133,14 @@ RZ_API RZ_BORROW RzCoreFile *rz_core_file_open_many(RZ_NONNULL RzCore *r, RZ_NUL
}
r->file = fh;
rz_list_append(r->files, fh);
if (!rz_core_bin_load(r, desc->name, loadaddr)) {
ut64 size = rz_io_desc_size(desc);
RZ_LOG_INFO("Mapping at 0x%08" PFMT64x " with size 0x08%" PFMT64x " %s\n", base_address, size, desc->name);
if (!rz_core_bin_load(r, desc->name, base_address)) {
RZ_LOG_ERROR("failed to load %s\n", desc->name);
}
// adds the current size and aligns next address
base_address += size;
rz_core_align_base_address(base_address);
}
rz_list_free(list_fds);

View file

@ -0,0 +1,19 @@
// SPDX-FileCopyrightText: 2021 ret2libc <sirmy15@gmail.com>
// SPDX-License-Identifier: LGPL-3.0-only
#ifndef RZ_CORE_PRIVATE_BASE_H
#define RZ_CORE_PRIVATE_BASE_H
#define RZ_CORE_BASE_ADDRESS_ALIGN 0x0000000000010000ull
#define RZ_CORE_BASE_ADDRESS_DEFAULT 0x0000000008000000ull
#define RZ_CORE_BASE_ADDRESS_DEX 0x0000000000200000ull
#define rz_core_align_base_address(x) \
do { \
if ((x) & (RZ_CORE_BASE_ADDRESS_ALIGN - 1)) { \
(x) += RZ_CORE_BASE_ADDRESS_ALIGN; \
(x) &= ~(RZ_CORE_BASE_ADDRESS_ALIGN - 1); \
} \
} while (0)
#endif /* RZ_CORE_PRIVATE_BASE_H */

View file

@ -435,8 +435,7 @@ static char *find_apk_binary(const char *filename, int rw, int mode, RzIO *io) {
eprintf("Warning: File %s does not exist, creating a new one.\n", name);
}
zfo->io_backref = io;
RzIODesc *desc = rz_io_desc_new(io, &rz_io_plugin_zip,
zfo->name, rw, mode, zfo);
RzIODesc *desc = rz_io_desc_new(io, &rz_io_plugin_zip, zfo->name, rw, mode, zfo);
desc->name = strdup(name);
rz_io_desc_add(io, desc);
}

View file

@ -129,150 +129,150 @@ nth paddr vaddr bind type size lib name
nth paddr vaddr bind type size lib name
----------------------------------------------------------------
1 ---------- 0x00000000 LOCAL FILE 0 arch.c
2 0x00000040 0x00000040 LOCAL SECT 0 .text
3 0x00000040 0x00000040 LOCAL SECT 0 .data
4 0x000036b0 0x000036b0 LOCAL SECT 0 .bss
5 0x000036b0 0x000036b0 LOCAL SECT 0 .debug_info
6 0x00003781 0x00003781 LOCAL SECT 0 .debug_abbrev
7 0x00003805 0x00003805 LOCAL SECT 0 .debug_aranges
8 0x00003825 0x00003825 LOCAL SECT 0 .debug_line
9 0x0000387b 0x0000387b LOCAL SECT 0 .debug_str
10 0x00003985 0x00003985 LOCAL SECT 0 .note.GNU-stack
11 0x0000396a 0x0000396a LOCAL SECT 0 .comment
12 0x00000040 0x00000040 GLOBAL OBJ 1200 gdb_regs_x86_64
13 0x00000500 0x00000500 GLOBAL OBJ 816 gdb_regs_x86_32
14 0x00000840 0x00000840 GLOBAL OBJ 1296 gdb_regs_arm32
15 0x00000d60 0x00000d60 GLOBAL OBJ 3312 gdb_regs_aarch64
16 0x00001a60 0x00001a60 GLOBAL OBJ 1920 gdb_regs_lm32
17 0x000021e0 0x000021e0 GLOBAL OBJ 3552 gdb_regs_mips
18 0x00002fc0 0x00002fc0 GLOBAL OBJ 1776 gdb_regs_avr
2 0x00000040 0x08020040 LOCAL SECT 0 .text
3 0x00000040 0x08020040 LOCAL SECT 0 .data
4 0x000036b0 0x080236b0 LOCAL SECT 0 .bss
5 0x000036b0 0x080236b0 LOCAL SECT 0 .debug_info
6 0x00003781 0x08023781 LOCAL SECT 0 .debug_abbrev
7 0x00003805 0x08023805 LOCAL SECT 0 .debug_aranges
8 0x00003825 0x08023825 LOCAL SECT 0 .debug_line
9 0x0000387b 0x0802387b LOCAL SECT 0 .debug_str
10 0x00003985 0x08023985 LOCAL SECT 0 .note.GNU-stack
11 0x0000396a 0x0802396a LOCAL SECT 0 .comment
12 0x00000040 0x08020040 GLOBAL OBJ 1200 gdb_regs_x86_64
13 0x00000500 0x08020500 GLOBAL OBJ 816 gdb_regs_x86_32
14 0x00000840 0x08020840 GLOBAL OBJ 1296 gdb_regs_arm32
15 0x00000d60 0x08020d60 GLOBAL OBJ 3312 gdb_regs_aarch64
16 0x00001a60 0x08021a60 GLOBAL OBJ 1920 gdb_regs_lm32
17 0x000021e0 0x080221e0 GLOBAL OBJ 3552 gdb_regs_mips
18 0x00002fc0 0x08022fc0 GLOBAL OBJ 1776 gdb_regs_avr
nth paddr vaddr bind type size lib name
-----------------------------------------------------------------------------
1 ---------- 0x00000000 LOCAL FILE 0 core.c
2 0x00000040 0x00000040 LOCAL SECT 0 .text
3 0x00003c3c 0x00003c3c LOCAL SECT 0 .data
4 0x00003c40 0x00003c40 LOCAL SECT 0 .bss
5 0x00000040 0x00000040 LOCAL FUNC 276 set_interface_attribs
6 0x00003c40 0x00003c40 LOCAL OBJ 32 reg_cache
7 0x00000154 0x00000154 LOCAL FUNC 96 reg_cache_init
8 0x00003c40 0x00003c40 LOCAL SECT 0 .rodata
9 0x000001b4 0x000001b4 LOCAL FUNC 177 gdbr_connect_lldb
10 0x00000f87 0x00000f87 LOCAL FUNC 157 gdbr_read_registers_lldb
11 0x00004080 0x00004080 LOCAL OBJ 17 __func__.10461
12 0x00003c3c 0x00003c3c LOCAL OBJ 4 P.10515
13 0x00003c60 0x00003c60 LOCAL OBJ 8 cur_desc
14 0x000021cb 0x000021cb LOCAL FUNC 57 _sigint_handler
15 0x00004098 0x00004098 LOCAL OBJ 15 __func__.10626
16 0x000040a8 0x000040a8 LOCAL OBJ 15 __func__.10638
17 0x000040c0 0x000040c0 LOCAL OBJ 16 __func__.10645
18 0x000040d0 0x000040d0 LOCAL SECT 0 .debug_info
19 0x00007b54 0x00007b54 LOCAL SECT 0 .debug_abbrev
20 0x00007cdd 0x00007cdd LOCAL SECT 0 .debug_aranges
21 0x00007d0d 0x00007d0d LOCAL SECT 0 .debug_line
22 0x00008339 0x00008339 LOCAL SECT 0 .debug_str
23 0x0000a1b2 0x0000a1b2 LOCAL SECT 0 .note.GNU-stack
24 0x0000a1b8 0x0000a1b8 LOCAL SECT 0 .eh_frame
25 0x0000a197 0x0000a197 LOCAL SECT 0 .comment
38 0x00000265 0x00000265 GLOBAL FUNC 1105 gdbr_connect
48 0x00000879 0x00000879 GLOBAL FUNC 390 gdbr_check_vcont
49 0x0000073e 0x0000073e GLOBAL FUNC 315 gdbr_select
51 0x000006b6 0x000006b6 GLOBAL FUNC 136 gdbr_disconnect
56 0x000009ff 0x000009ff GLOBAL FUNC 79 gdbr_stop_reason
58 0x00000a4e 0x00000a4e GLOBAL FUNC 167 gdbr_check_extended_mode
59 0x00000af5 0x00000af5 GLOBAL FUNC 298 gdbr_attach
62 0x00000c1f 0x00000c1f GLOBAL FUNC 95 gdbr_detach
63 0x00000c7e 0x00000c7e GLOBAL FUNC 313 gdbr_detach_pid
64 0x00000db7 0x00000db7 GLOBAL FUNC 144 gdbr_kill
65 0x00000e47 0x00000e47 GLOBAL FUNC 320 gdbr_kill_pid
68 0x00001024 0x00001024 GLOBAL FUNC 314 gdbr_read_registers
70 0x0000115e 0x0000115e GLOBAL FUNC 954 gdbr_read_memory
75 0x00001518 0x00001518 GLOBAL FUNC 709 gdbr_write_memory
78 0x000017dd 0x000017dd GLOBAL FUNC 149 gdbr_step
79 0x00002204 0x00002204 GLOBAL FUNC 870 send_vcont
80 0x00001872 0x00001872 GLOBAL FUNC 309 gdbr_continue
82 0x000019a7 0x000019a7 GLOBAL FUNC 251 gdbr_write_bin_registers
84 0x00001aa2 0x00001aa2 GLOBAL FUNC 365 gdbr_write_register
86 0x00001c0f 0x00001c0f GLOBAL FUNC 395 gdbr_write_reg
87 0x00001d9a 0x00001d9a GLOBAL FUNC 970 gdbr_write_registers
92 0x00002164 0x00002164 GLOBAL FUNC 103 test_command
97 0x0000256a 0x0000256a GLOBAL FUNC 426 set_bp
99 0x00002714 0x00002714 GLOBAL FUNC 47 gdbr_set_bp
100 0x00002743 0x00002743 GLOBAL FUNC 47 gdbr_set_hwbp
101 0x00002772 0x00002772 GLOBAL FUNC 42 gdbr_remove_bp
102 0x000027c6 0x000027c6 GLOBAL FUNC 419 remove_bp
103 0x0000279c 0x0000279c GLOBAL FUNC 42 gdbr_remove_hwbp
105 0x00002969 0x00002969 GLOBAL FUNC 453 gdbr_open_file
107 0x00002b2e 0x00002b2e GLOBAL FUNC 496 gdbr_read_file
109 0x00002d1e 0x00002d1e GLOBAL FUNC 249 gdbr_close_file
111 0x00002e17 0x00002e17 GLOBAL FUNC 14 gdbr_invalidate_reg_cache
112 0x00002e25 0x00002e25 GLOBAL FUNC 729 gdbr_send_qRcmd
115 0x000030fe 0x000030fe GLOBAL FUNC 655 gdbr_exec_file_read
117 0x0000338d 0x0000338d GLOBAL FUNC 467 gdbr_is_thread_dead
118 0x00003560 0x00003560 GLOBAL FUNC 842 gdbr_threads_list
124 0x000038aa 0x000038aa GLOBAL FUNC 912 gdbr_get_baddr
26 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp._GLOBAL_OFFSET_TABLE_
27 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.memset
28 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.tcgetattr
29 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.cfsetospeed
30 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.cfsetispeed
31 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.tcsetattr
32 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.__stack_chk_fail
33 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.malloc
34 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.gdbr_read_target_xml
35 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.send_msg
36 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.read_packet
37 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.send_ack
39 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_strbuf_init
40 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.getenv
41 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strtoul
42 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.snprintf
43 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_socket_connect_serial
44 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_socket_connect
45 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_qSupported
46 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strncmp
47 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_qC
50 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strcmp
52 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_socket_close
53 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.free
54 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.write_thread_id
55 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strtok
57 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_stop_reason
60 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.calloc
61 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_attach
66 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_lldb_read_reg
67 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.memcpy
69 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_g
71 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.stderr
72 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.fprintf
73 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_m
74 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.memmove
76 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.pack_hex
77 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_M
81 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strncpy
83 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_G
85 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_P
88 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strlen
89 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strchr
90 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strcpy
91 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.hex2char
93 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.hexdump
94 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_socket_write
95 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.signal
96 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_cont
98 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_setbp
104 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_removebp
106 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_vFile_open
108 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_vFile_pread
110 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.handle_vFile_close
113 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.__ctype_b_loc
114 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.unpack_hex
116 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_str_append
119 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_list_new
120 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.read_thread_id
121 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strdup
122 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_list_free
123 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_list_append
125 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.r_str_startswith
126 0x00000000 0x00000000 GLOBAL NOTYPE 16 imp.strtoull
2 0x00000040 0x08070040 LOCAL SECT 0 .text
3 0x00003c3c 0x08073c3c LOCAL SECT 0 .data
4 0x00003c40 0x08073c40 LOCAL SECT 0 .bss
5 0x00000040 0x08070040 LOCAL FUNC 276 set_interface_attribs
6 0x00003c40 0x08073c40 LOCAL OBJ 32 reg_cache
7 0x00000154 0x08070154 LOCAL FUNC 96 reg_cache_init
8 0x00003c40 0x08073c40 LOCAL SECT 0 .rodata
9 0x000001b4 0x080701b4 LOCAL FUNC 177 gdbr_connect_lldb
10 0x00000f87 0x08070f87 LOCAL FUNC 157 gdbr_read_registers_lldb
11 0x00004080 0x08074080 LOCAL OBJ 17 __func__.10461
12 0x00003c3c 0x08073c3c LOCAL OBJ 4 P.10515
13 0x00003c60 0x08073c60 LOCAL OBJ 8 cur_desc
14 0x000021cb 0x080721cb LOCAL FUNC 57 _sigint_handler
15 0x00004098 0x08074098 LOCAL OBJ 15 __func__.10626
16 0x000040a8 0x080740a8 LOCAL OBJ 15 __func__.10638
17 0x000040c0 0x080740c0 LOCAL OBJ 16 __func__.10645
18 0x000040d0 0x080740d0 LOCAL SECT 0 .debug_info
19 0x00007b54 0x08077b54 LOCAL SECT 0 .debug_abbrev
20 0x00007cdd 0x08077cdd LOCAL SECT 0 .debug_aranges
21 0x00007d0d 0x08077d0d LOCAL SECT 0 .debug_line
22 0x00008339 0x08078339 LOCAL SECT 0 .debug_str
23 0x0000a1b2 0x0807a1b2 LOCAL SECT 0 .note.GNU-stack
24 0x0000a1b8 0x0807a1b8 LOCAL SECT 0 .eh_frame
25 0x0000a197 0x0807a197 LOCAL SECT 0 .comment
38 0x00000265 0x08070265 GLOBAL FUNC 1105 gdbr_connect
48 0x00000879 0x08070879 GLOBAL FUNC 390 gdbr_check_vcont
49 0x0000073e 0x0807073e GLOBAL FUNC 315 gdbr_select
51 0x000006b6 0x080706b6 GLOBAL FUNC 136 gdbr_disconnect
56 0x000009ff 0x080709ff GLOBAL FUNC 79 gdbr_stop_reason
58 0x00000a4e 0x08070a4e GLOBAL FUNC 167 gdbr_check_extended_mode
59 0x00000af5 0x08070af5 GLOBAL FUNC 298 gdbr_attach
62 0x00000c1f 0x08070c1f GLOBAL FUNC 95 gdbr_detach
63 0x00000c7e 0x08070c7e GLOBAL FUNC 313 gdbr_detach_pid
64 0x00000db7 0x08070db7 GLOBAL FUNC 144 gdbr_kill
65 0x00000e47 0x08070e47 GLOBAL FUNC 320 gdbr_kill_pid
68 0x00001024 0x08071024 GLOBAL FUNC 314 gdbr_read_registers
70 0x0000115e 0x0807115e GLOBAL FUNC 954 gdbr_read_memory
75 0x00001518 0x08071518 GLOBAL FUNC 709 gdbr_write_memory
78 0x000017dd 0x080717dd GLOBAL FUNC 149 gdbr_step
79 0x00002204 0x08072204 GLOBAL FUNC 870 send_vcont
80 0x00001872 0x08071872 GLOBAL FUNC 309 gdbr_continue
82 0x000019a7 0x080719a7 GLOBAL FUNC 251 gdbr_write_bin_registers
84 0x00001aa2 0x08071aa2 GLOBAL FUNC 365 gdbr_write_register
86 0x00001c0f 0x08071c0f GLOBAL FUNC 395 gdbr_write_reg
87 0x00001d9a 0x08071d9a GLOBAL FUNC 970 gdbr_write_registers
92 0x00002164 0x08072164 GLOBAL FUNC 103 test_command
97 0x0000256a 0x0807256a GLOBAL FUNC 426 set_bp
99 0x00002714 0x08072714 GLOBAL FUNC 47 gdbr_set_bp
100 0x00002743 0x08072743 GLOBAL FUNC 47 gdbr_set_hwbp
101 0x00002772 0x08072772 GLOBAL FUNC 42 gdbr_remove_bp
102 0x000027c6 0x080727c6 GLOBAL FUNC 419 remove_bp
103 0x0000279c 0x0807279c GLOBAL FUNC 42 gdbr_remove_hwbp
105 0x00002969 0x08072969 GLOBAL FUNC 453 gdbr_open_file
107 0x00002b2e 0x08072b2e GLOBAL FUNC 496 gdbr_read_file
109 0x00002d1e 0x08072d1e GLOBAL FUNC 249 gdbr_close_file
111 0x00002e17 0x08072e17 GLOBAL FUNC 14 gdbr_invalidate_reg_cache
112 0x00002e25 0x08072e25 GLOBAL FUNC 729 gdbr_send_qRcmd
115 0x000030fe 0x080730fe GLOBAL FUNC 655 gdbr_exec_file_read
117 0x0000338d 0x0807338d GLOBAL FUNC 467 gdbr_is_thread_dead
118 0x00003560 0x08073560 GLOBAL FUNC 842 gdbr_threads_list
124 0x000038aa 0x080738aa GLOBAL FUNC 912 gdbr_get_baddr
26 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp._GLOBAL_OFFSET_TABLE_
27 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.memset
28 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.tcgetattr
29 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.cfsetospeed
30 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.cfsetispeed
31 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.tcsetattr
32 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.__stack_chk_fail
33 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.malloc
34 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.gdbr_read_target_xml
35 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.send_msg
36 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.read_packet
37 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.send_ack
39 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_strbuf_init
40 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.getenv
41 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strtoul
42 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.snprintf
43 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_socket_connect_serial
44 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_socket_connect
45 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_qSupported
46 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strncmp
47 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_qC
50 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strcmp
52 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_socket_close
53 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.free
54 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.write_thread_id
55 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strtok
57 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_stop_reason
60 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.calloc
61 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_attach
66 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_lldb_read_reg
67 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.memcpy
69 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_g
71 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.stderr
72 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.fprintf
73 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_m
74 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.memmove
76 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.pack_hex
77 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_M
81 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strncpy
83 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_G
85 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_P
88 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strlen
89 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strchr
90 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strcpy
91 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.hex2char
93 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.hexdump
94 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_socket_write
95 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.signal
96 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_cont
98 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_setbp
104 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_removebp
106 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_vFile_open
108 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_vFile_pread
110 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.handle_vFile_close
113 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.__ctype_b_loc
114 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.unpack_hex
116 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_str_append
119 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_list_new
120 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.read_thread_id
121 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strdup
122 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_list_free
123 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_list_append
125 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.r_str_startswith
126 0x00000000 0x08070000 GLOBAL NOTYPE 16 imp.strtoull
EOF
RUN