This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Tweak gdb.trace/tfile.c for thumb mode
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Wed, 16 Jul 2014 10:15:59 +0800
- Subject: Re: [PATCH] Tweak gdb.trace/tfile.c for thumb mode
- Authentication-results: sourceware.org; auth=none
- References: <1404100222-2312-1-git-send-email-yao at codesourcery dot com> <53BD5710 dot 5040105 at redhat dot com> <53BDEBD8 dot 5030201 at codesourcery dot com> <53C52622 dot 3000405 at redhat dot com> <53C53319 dot 7090001 at codesourcery dot com> <53C537A1 dot 9080802 at redhat dot com> <53C5DC6F dot 6060007 at codesourcery dot com>
On 07/15/2014 09:01 PM, Pedro Alves wrote:
> /* FIXME need a portable way to print function address in hex */
Happen to see that we can remove the FIXME too.
> - func_addr = (long) &write_basic_trace_file;
> -#if defined(__thumb__) || defined(__thumb2__)
> - /* Although Thumb functions are two-byte aligned, function
> - pointers have the Thumb bit set. Clear it. */
> - func_addr &= ~1;
> -#endif
> + func_addr = FUNCTION_ADDRESS (write_basic_trace_file);
--
Yao (éå)