diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-01-22 19:18:16 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-01-22 19:18:16 +0100 |
commit | 4b62a76e0cd716407859077467fddbb66b715a43 (patch) | |
tree | 1c052819816f43decc7f18570f2a83ed42a9e66a /gdb/testsuite | |
parent | 82a864f96aff83edb0c8bb21ead5c28cd10363fe (diff) | |
download | gdb-4b62a76e0cd716407859077467fddbb66b715a43.zip gdb-4b62a76e0cd716407859077467fddbb66b715a43.tar.gz gdb-4b62a76e0cd716407859077467fddbb66b715a43.tar.bz2 |
compile: Fix function pointers
TBH while I always comment reasons for each of the compilation options in
reality I tried them all and chose that combination that needs the most simple
compile/compile-object-load.c (ld.so emulation) implementation.
gdb/ChangeLog
2015-01-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* compile/compile.c (_initialize_compile): Use -fPIE for compile_args.
gdb/testsuite/ChangeLog
2015-01-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.compile/compile.exp (pointer to jit function): New test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.compile/compile.exp | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9dd10f0..b01a4c9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-01-22 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdb.compile/compile.exp (pointer to jit function): New test. + 2015-01-17 Wei-cheng Wang <cole945@gmail.com> * lib/gdb.exp (supports_process_record): Return true for diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index e426cc1..dc09770 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -259,6 +259,11 @@ gdb_test_no_output "end" "compile code -r multiline 4" gdb_test "print 'compile.c'::globalshadow" " = 77000" \ "check globalshadow with -r" +# Test GOT vs. resolving jit function pointers. + +gdb_test_no_output "compile -raw -- int func(){return 21;} _gdb_expr(){int (*funcp)()=func; if (funcp()!=21) abort();}" \ + "pointer to jit function" + # # Test the case where the registers structure would not normally have # any fields. |