This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb 7.6: Fix info mem command for 32 bits host/64 bits target


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]