File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,13 @@ BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
8
8
${OBJ_BU}/libiberty/libiberty.a
9
9
GDBLIBS = ${OBJ_GDB}/libgdb/libgdb.a
10
10
11
- DPADD = ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
12
- LDADD = ${GDBLIBS} ${BULIBS} -lkvm -lm -lreadline -ltermcap -lgnuregex
11
+ DPADD = ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAP} \
12
+ ${LIBGNUREGEX}
13
+ LDADD = ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm -lreadline -ltermcap \
14
+ -lgnuregex
15
+
16
+ .if defined(GDB_CROSS_DEBUGGER)
17
+ CFLAGS+ = -Wl,-export-dynamic
18
+ .endif
13
19
14
20
.include <bsd.prog.mk>
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ __FBSDID("$FreeBSD$");
41
41
#include <kvm.h>
42
42
#include <limits.h>
43
43
#include <paths.h>
44
+ #ifdef CROSS_DEBUGGER
45
+ #include <proc_service.h>
46
+ #endif
44
47
#include <stdio.h>
45
48
#include <stdlib.h>
46
49
#include <string.h>
@@ -78,6 +81,24 @@ static struct ui_file *parse_gdberr;
78
81
79
82
static void (* kgdb_new_objfile_chain )(struct objfile * objfile );
80
83
84
+ #ifdef CROSS_DEBUGGER
85
+ ps_err_e
86
+ ps_pglobal_lookup (struct ps_prochandle * ph , const char * obj , const char * name ,
87
+ psaddr_t * sym_addr )
88
+ {
89
+ struct minimal_symbol * ms ;
90
+ CORE_ADDR addr ;
91
+
92
+ ms = lookup_minimal_symbol (name , NULL , NULL );
93
+ if (ms == NULL )
94
+ return PS_NOSYM ;
95
+
96
+ addr = SYMBOL_VALUE_ADDRESS (ms );
97
+ store_typed_address (sym_addr , builtin_type_void_data_ptr , addr );
98
+ return PS_OK ;
99
+ }
100
+ #endif
101
+
81
102
static void
82
103
usage (void )
83
104
{
You can’t perform that action at this time.
0 commit comments