diff options
author | Yao Qi <yao@codesourcery.com> | 2014-11-22 21:28:31 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-11-22 21:28:31 +0800 |
commit | 84429e27c826c74b99791b8f1efe8dce03cfa6ca (patch) | |
tree | f2befb0d9dc9af35ef8e49366eb78a8bf2bd2c8a /gdb/testsuite/gdb.trace/entry-values.c | |
parent | 267418593cfb3986a924024a28e3283626399301 (diff) | |
download | binutils-84429e27c826c74b99791b8f1efe8dce03cfa6ca.zip binutils-84429e27c826c74b99791b8f1efe8dce03cfa6ca.tar.gz binutils-84429e27c826c74b99791b8f1efe8dce03cfa6ca.tar.bz2 |
Use MACRO_AT_func in entry-values.exp
MACRO_AT_func can be used in gdb.trace/entry-values.exp to correctly
get function's address in generated debug info. As a result, the test
is more friendly to clang. Currently, there are some fails in
entry-values.exp when the test is compiled by clang. With this patch
applied, all fails go away.
gdb/testsuite:
2014-11-22 Yao Qi <yao@codesourcery.com>
* gdb.trace/entry-values.c: Remove asms.
(foo): Add foo_label.
(bar): Add bar_label.
* gdb.trace/entry-values.exp: Remove code computing foo's
length and bar's length.
(Dwarf::assemble): Invoke function_range for bar and use
MACRO_AT_func for foo.
Diffstat (limited to 'gdb/testsuite/gdb.trace/entry-values.c')
-rw-r--r-- | gdb/testsuite/gdb.trace/entry-values.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.trace/entry-values.c b/gdb/testsuite/gdb.trace/entry-values.c index 11bb739..c0d561a 100644 --- a/gdb/testsuite/gdb.trace/entry-values.c +++ b/gdb/testsuite/gdb.trace/entry-values.c @@ -15,23 +15,19 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -asm (".section \".text\""); -asm (".balign 8"); -asm ("foo_start: .globl foo_start"); - int foo (int i, int j) { + asm ("foo_label: .globl foo_label"); return 0; } -asm ("bar_start: .globl bar_start"); - int bar (int i) { int j = 2; + asm ("bar_label: .globl bar_label"); return foo (i, j); } |