This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gdb 7.6: Fix info mem command for 32 bits host/64 bits target
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>, Udma Catalin-Dan-B32721 <B32721 at freescale dot com>
- Date: Wed, 26 Jun 2013 10:52:07 -0600
- Subject: Re: gdb 7.6: Fix info mem command for 32 bits host/64 bits target
- References: <FE751157F0442848A159F3AB4CB1F55B3D9FE8 at 039-SN1MPN1-001 dot 039d dot mgd dot msft dot net> <51CB116D dot 7060009 at redhat dot com> <51CB11D6 dot 1020306 at redhat dot com>
Pedro> static void
Pedro> breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
Pedro> int bnum, int have_bnum)
Pedro> {
Pedro> /* The longest string possibly returned by hex_string_custom
Pedro> is 50 chars. These must be at least that big for safety. */
Pedro> char astr1[64];
Pedro> char astr2[64];
Pedro> strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8));
Pedro> strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8));
These strcpy calls are also bogus.
hex_string_custom uses the "cell" mechanism, so this code can assume
that these calls don't interfere.
Tom