gdb_monitor: kernel-agnostic build support

Fixes #2292
This commit is contained in:
Christian Prochaska 2017-02-25 23:58:37 +01:00 committed by Christian Helmuth
parent daaddbd584
commit e7958d999d
29 changed files with 249 additions and 34 deletions

View File

@ -0,0 +1 @@
SHARED_LIB = yes

View File

@ -1,13 +1,8 @@
REQUIRES += foc
SRC_CC = spec/foc_arm/low.cc \
spec/foc/native_cpu.cc
INC_DIR += $(REP_DIR)/src/lib/gdbserver_platform/spec/arm
SRC_C = reg-arm.c \
linux-arm-low.c
CC_OPT_linux-arm-low += -Wno-unused-function
LIBS += syscall-foc
include $(REP_DIR)/lib/mk/gdbserver_platform.inc

View File

@ -0,0 +1,12 @@
REQUIRES += foc
SRC_CC = spec/arm/low.cc \
native_cpu.cc
LIBS += syscall-foc
SHARED_LIB = yes
vpath %.cc $(REP_DIR)/src/lib/gdbserver_platform-foc
include $(REP_DIR)/lib/mk/spec/arm/gdbserver_platform-arm.inc

View File

@ -1 +0,0 @@
LIBS += gdbserver_platform_foc

View File

@ -1 +0,0 @@
LIBS += gdbserver_platform_nova

View File

@ -0,0 +1,12 @@
REQUIRES += foc
SRC_CC = spec/x86_32/low.cc \
native_cpu.cc
LIBS += syscall-foc
SHARED_LIB = yes
vpath %.cc $(REP_DIR)/src/lib/gdbserver_platform-foc
include $(REP_DIR)/lib/mk/spec/x86_32/gdbserver_platform-x86_32.inc

View File

@ -0,0 +1,10 @@
REQUIRES += nova
SRC_CC = spec/x86_32/low.cc \
native_cpu.cc
SHARED_LIB = yes
vpath %.cc $(REP_DIR)/src/lib/gdbserver_platform-nova
include $(REP_DIR)/lib/mk/spec/x86_32/gdbserver_platform-x86_32.inc

View File

@ -1,3 +1,5 @@
INC_DIR += $(REP_DIR)/src/lib/gdbserver_platform/spec/x86_32
SRC_C = i386.c \
i386-avx.c \
linux-x86-low.c

View File

@ -1,8 +0,0 @@
REQUIRES += foc
SRC_CC = spec/foc_x86_32/low.cc \
spec/foc/native_cpu.cc
LIBS += syscall-foc
include $(REP_DIR)/lib/mk/spec/x86_32/gdbserver_platform_x86_32.inc

View File

@ -1,5 +0,0 @@
REQUIRES += nova
SRC_CC = spec/nova_x86_32/low.cc native_cpu.cc
include $(REP_DIR)/lib/mk/spec/x86_32/gdbserver_platform_x86_32.inc

View File

@ -0,0 +1,10 @@
REQUIRES += nova
SRC_CC = spec/x86_64/low.cc \
native_cpu.cc
SHARED_LIB = yes
vpath %.cc $(REP_DIR)/src/lib/gdbserver_platform-nova
include $(REP_DIR)/lib/mk/spec/x86_64/gdbserver_platform-x86_64.inc

View File

@ -1,3 +1,5 @@
INC_DIR += $(REP_DIR)/src/lib/gdbserver_platform/spec/x86_64
SRC_C = i386.c \
i386-avx.c \
amd64.c \

View File

@ -1,5 +0,0 @@
REQUIRES += nova
SRC_CC = spec/nova_x86_64/low.cc native_cpu.cc
include $(REP_DIR)/lib/mk/spec/x86_64/gdbserver_platform_x86_64.inc

View File

@ -0,0 +1,146 @@
abort U
__aeabi_unwind_cpp_pr0 U
__aeabi_unwind_cpp_pr1 U
all_lwps U
all_threads U
amd64_emit_ops D 248
collect_register_by_name U
collect_register U
current_inferior U
current_insn_ptr U
current_process U
__cxa_allocate_exception U
__cxa_begin_catch U
__cxa_end_catch U
__cxa_end_cleanup U
__cxa_get_exception_ptr U
__cxa_pure_virtual U
__cxa_throw U
debug_threads U
delete_gdb_breakpoint_at U
dl_unwind_find_exidx W
__dynamic_cast U
emit_error U
__error U
error U
expedite_regs_amd64_avx D 32
expedite_regs_amd64 D 32
expedite_regs_arm D 16
expedite_regs_i386_avx D 32
expedite_regs_i386 D 32
fatal U
find_inferior_id U
find_inferior U
find_lwp_pid U
find_regno U
fprintf U
free U
gdbserver_expedite_regs U
gdbserver_xmltarget U
genode_fetch_register T
genode_read_memory_byte U
genode_store_register T
get_raw_reg_func_addr U
get_thread_regcache U
__gnu_Unwind_Find_exidx T
__gxx_personality_v0 U
i386_dr_low_get_addr T
i386_dr_low_get_control T
i386_dr_low_get_status T
i386_dr_low_set_addr T
i386_dr_low_set_control T
i386_emit_ops D 248
i386_low_init_dregs U
i386_low_insert_watchpoint U
i386_low_remove_watchpoint U
i386_low_stopped_by_watchpoint U
i386_low_stopped_data_address U
inferior_target_data U
init_registers_amd64_avx T
init_registers_amd64 T
init_registers_arm T
init_registers_i386_avx T
init_registers_i386 T
_init T
internal_error U
l4_atomic_add T
l4_atomic_cmpxchg T
l4_atomic_xchg T
l4_utcb_wrap W
linux_stop_lwp U
memcpy U
num_xmm_registers U
paddress U
pid_to_ptid U
ps_get_thread_area T
ptid_get_lwp U
ptid_get_pid U
ptrace U
regcache_invalidate U
register_size U
regs_amd64_avx D 1168
regs_amd64 D 912
regs_arm D 312
regs_i386_avx D 784
regs_i386 D 656
relocate_instruction U
set_gdb_breakpoint_at U
set_register_cache U
__stderrp U
strtok U
strtoul U
supply_register_by_name U
supply_register U
target_regsets D 112
the_low_target D 216
the_target U
_Unwind_Resume U
write_inferior_memory U
x86_xcr0 U
xcalloc U
xmltarget_amd64_avx D 8
xmltarget_amd64 D 8
xmltarget_arm D 4
xmltarget_i386_avx D 8
xmltarget_i386 D 8
xstrdup U
_Z14fetch_registerPKcmRm T
_Z14store_registerPKcRmm T
_Z21cannot_fetch_registerPKc T
_Z21cannot_store_registerPKcm T
_Z22genode_child_resourcesv U
_Z24get_current_thread_statev T
_Z24set_current_thread_stateN6Genode12Thread_stateE T
_ZdlPvRN6Genode11DeallocatorE U
_ZdlPv U
_ZN11Gdb_monitor21Cpu_session_component10thread_capEm U
_ZN11Gdb_monitor21Cpu_session_component17lookup_cpu_threadEN6Genode10CapabilityINS1_10Cpu_threadEEE U
_ZN11Gdb_monitor21Cpu_session_component17_setup_native_cpuEv T
_ZN11Gdb_monitor21Cpu_session_component18parent_cpu_sessionEv U
_ZN11Gdb_monitor21Cpu_session_component19_cleanup_native_cpuEv T
_ZN11Gdb_monitor21Cpu_session_component9thread_epEv U
_ZN6Genode13Avl_node_baseC2Ev U
_ZN6Genode14Rpc_entrypoint7_manageEPNS_15Rpc_object_baseE U
_ZN6Genode14Rpc_entrypoint9_dissolveEPNS_15Rpc_object_baseE U
_ZN6Genode15Cancelable_lock4lockEv U
_ZN6Genode15Cancelable_lock6unlockEv U
_ZN6Genode15Cancelable_lockC2ENS0_5StateE U
_ZN6Genode17Native_capability4_decEv U
_ZN6Genode17Native_capability4_incEv U
_ZN6Genode17Native_capabilityC1Ev U
_ZN6Genode17Native_capabilityC2Ev U
_ZN6Genode3Log3logEv U
_ZN6Genode3Log8_acquireENS0_4TypeE U
_ZN6Genode3Log8_releaseEv U
_ZN6Genode5printERNS_6OutputEl U
_ZN6Genode5printERNS_6OutputEPKc U
_ZN6Genode5printERNS_6OutputEPKv U
_ZN6Genode5Trace6Logger17_evaluate_controlEv U
_ZN6Genode6Thread7_loggerEv U
_ZN6Genode8ipc_callENS_17Native_capabilityERNS_11Msgbuf_baseES2_m U
_ZNK6Genode17Native_capability10local_nameEv U
_ZnwjRN6Genode9AllocatorE U
_ZSt9terminatev U
_ZTVN10__cxxabiv117__class_type_infoE U
_ZTVN10__cxxabiv120__si_class_type_infoE U
_ZTVN10__cxxabiv121__vmi_class_type_infoE U

View File

@ -25,6 +25,8 @@ set build_components {
drivers/framebuffer drivers/input
}
lappend build_components "lib/gdbserver_platform-$::env(KERNEL)"
source ${genode_dir}/repos/base/run/platform_drv.inc
append_platform_drv_build_components
@ -112,12 +114,17 @@ install_config $config
# Boot modules
#
# evaluated by the run tool
proc binary_name_gdbserver_platform_lib_so { } {
return "gdbserver_platform-$::env(KERNEL).lib.so"
}
# generic modules
set boot_modules {
core init timer
ld.lib.so libc.lib.so libc_pipe.lib.so libc_terminal.lib.so
uart_drv
gdb_monitor
gdb_monitor gdbserver_platform.lib.so
nitpicker pointer scout
}

View File

@ -19,13 +19,17 @@ if {![have_include "power_on/qemu"] ||
# Build
#
build {
set build_components {
core init
drivers/timer drivers/uart
app/gdb_monitor
test/gdb_monitor
}
lappend build_components "lib/gdbserver_platform-$::env(KERNEL)"
build $build_components
create_boot_directory
#
@ -87,12 +91,17 @@ install_config $config
# Boot modules
#
# evaluated by the run tool
proc binary_name_gdbserver_platform_lib_so { } {
return "gdbserver_platform-$::env(KERNEL).lib.so"
}
# generic modules
set boot_modules {
core init timer
ld.lib.so libc.lib.so libm.lib.so libc_pipe.lib.so libc_terminal.lib.so
uart_drv
gdb_monitor test-gdb_monitor
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor
}
build_boot_image $boot_modules

View File

@ -9,13 +9,17 @@
# Build
#
build {
set build_components {
core init
drivers/timer drivers/uart
app/gdb_monitor
test/gdb_monitor
}
lappend build_components "lib/gdbserver_platform-$::env(KERNEL)"
build $build_components
create_boot_directory
#
@ -74,12 +78,17 @@ install_config $config
# Boot modules
#
# evaluated by the run tool
proc binary_name_gdbserver_platform_lib_so { } {
return "gdbserver_platform-$::env(KERNEL).lib.so"
}
# generic modules
set boot_modules {
core init timer
ld.lib.so libc.lib.so libm.lib.so libc_pipe.lib.so libc_terminal.lib.so
uart_drv
gdb_monitor test-gdb_monitor
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor
}
build_boot_image $boot_modules

View File

@ -8,13 +8,17 @@
# Build
#
build {
set build_components {
core init
drivers/timer drivers/uart
app/gdb_monitor
test/gdb_monitor_target_config
}
lappend build_components "lib/gdbserver_platform-$::env(KERNEL)"
build $build_components
create_boot_directory
#
@ -74,12 +78,17 @@ install_config $config
# Boot modules
#
# evaluated by the run tool
proc binary_name_gdbserver_platform_lib_so { } {
return "gdbserver_platform-$::env(KERNEL).lib.so"
}
# generic modules
set boot_modules {
core init timer
ld.lib.so libc.lib.so libc_pipe.lib.so libc_terminal.lib.so
uart_drv
gdb_monitor test-gdb_monitor_target_config
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor_target_config
}
build_boot_image $boot_modules

View File

@ -26,6 +26,8 @@ set build_components {
app/gdb_monitor
}
lappend build_components "lib/gdbserver_platform-$::env(KERNEL)"
proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv }
if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv }
return gpio_drv }
@ -217,12 +219,17 @@ install_config $config
# Boot modules
#
# evaluated by the run tool
proc binary_name_gdbserver_platform_lib_so { } {
return "gdbserver_platform-$::env(KERNEL).lib.so"
}
# generic modules
set boot_modules {
core init timer ld.lib.so noux terminal terminal_crosslink
libc.lib.so libm.lib.so libc_noux.lib.so ncurses.lib.so expat.lib.so
libc_pipe.lib.so libc_terminal.lib.so
gdb_monitor test-gdb_monitor
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor
gdb.tar test-gdb_monitor.tar test-gdb_monitor-src.tar
}

View File

@ -0,0 +1,2 @@
TARGET = gdbserver_platform-foc
LIBS = gdbserver_platform-foc

View File

@ -0,0 +1,2 @@
TARGET = gdbserver_platform-nova
LIBS = gdbserver_platform-nova