Compare commits

...

77 Commits

Author SHA1 Message Date
Thomas Preud'homme
23c16316b1 Bump date 2016-09-23 09:29:22 +01:00
Thomas Preud'homme
1be8e6826a Bump version to match embedded-binutils-2_26-branch
2016-06-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	bfd/
	* version.h (BFD_VERSION_DATE): Bump date to 20160616.
2016-06-22 11:02:58 +01:00
Thomas Preud'homme
0986596ce7 Add missing ChangeLog.arm entry for previous commit 2016-06-20 15:53:15 +01:00
Yao Qi
b311672cf5 2016-06-20 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
Skip unwritable frames in command "finish"

Nowadays, GDB can't insert breakpoint on the return address of the
exception handler on ARM M-profile, because the address is a magic
one 0xfffffff9,

 (gdb) bt
 #0  CT32B1_IRQHandler () at ../src/timer.c:67
 #1  <signal handler called>
 #2  main () at ../src/timer.c:127

(gdb) info frame
Stack level 0, frame at 0x200ffa8:
 pc = 0x4ec in CT32B1_IRQHandler (../src/timer.c:67); saved pc = 0xfffffff9
 called by frame at 0x200ffc8
 source language c.
 Arglist at 0x200ffa0, args:
 Locals at 0x200ffa0, Previous frame's sp is 0x200ffa8
 Saved registers:
  r7 at 0x200ffa0, lr at 0x200ffa4

(gdb) x/x 0xfffffff9
0xfffffff9:     Cannot access memory at address 0xfffffff9

(gdb) finish
Run till exit from #0  CT32B1_IRQHandler () at ../src/timer.c:67
Ed:15: Target error from Set break/watch: Et:96: Pseudo-address (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?)

Warning:
Cannot insert hardware breakpoint 0.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Command aborted.

even some debug probe can't set hardware breakpoint on the magic
address too,

(gdb) hbreak *0xfffffff9
Hardware assisted breakpoint 2 at 0xfffffff9
(gdb) c
Continuing.
Ed:15: Target error from Set break/watch: Et:96: Pseudo-address (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?)

Warning:
Cannot insert hardware breakpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Command aborted.

The problem described above is quite similar to PR 8841, in which GDB
can't set breakpoint on signal trampoline, which is mapped to a read-only
page by kernel.  The rationale of this patch is to skip "unwritable"
frames when looking for caller frames in command "finish", and a new
gdbarch method code_of_frame_writable is added.  This patch fixes
the problem on ARM cortex-m target, but it can be used to fix
PR 8841 too.

gdb:

2016-05-10  Yao Qi  <yao.qi@arm.com>

	* arch-utils.c (default_code_of_frame_writable): New function.
	* arch-utils.h (default_code_of_frame_writable): Declare.
	* arm-tdep.c (arm_code_of_frame_writable): New function.
	(arm_gdbarch_init): Install gdbarch method
	code_of_frame_writable if the target is M-profile.
	* frame.c (skip_unwritable_frames): New function.
	* frame.h (skip_unwritable_frames): Declare.
	* gdbarch.sh (code_of_frame_writable): New.
	* gdbarch.c, gdbarch.h: Re-generated.
	* infcmd.c (finish_command): Call skip_unwritable_frames.
2016-06-20 15:40:14 +01:00
Thomas Preud'homme
39e1183fea Add an expect for running commands with CLI jump
2016-04-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Backport from master
    2015-12-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gdb/testsuite/
    * lib/mi-support.exp (mi_run_cmd_full): Add an expect for the CLI jump
    case.
2016-04-06 14:32:37 +01:00
Andre Simoes Dias Vieira
439ccc8bd5 Fix using uninitialised values
We did a code refacotr here
https://sourceware.org/ml/gdb-patches/2013-11/msg00063.html

>	(get_current_thread): New function, factored out from ...
>	(add_current_inferior_and_thread): ... this.  Adjust.
>
>@@ -3332,18 +3371,8 @@ add_current_inferior_and_thread (char *wait_status)
>
>   inferior_ptid = null_ptid;
>
>-  /* Now, if we have thread information, update inferior_ptid.  First
>-     if we have a stop reply handy, maybe it's a T stop reply with a
>-     "thread" register we can extract the current thread from.  If
>-     not, ask the remote which is the current thread, with qC.  The
>-     former method avoids a roundtrip.  Note we don't use
>-     remote_parse_stop_reply as that makes use of the target
>-     architecture, which we haven't yet fully determined at this
>-     point.  */
>-  if (wait_status != NULL)
>-    ptid = stop_reply_extract_thread (wait_status);
>-  if (ptid_equal (ptid, null_ptid))
>-    ptid = remote_current_thread (inferior_ptid);
>+  /* Now, if we have thread information, update inferior_ptid.  */
>+  ptid = get_current_thread (wait_status);

but after the refactor, local variable ptid is used without
initialisation.  However, before this change, ptid is initialised to
null_ptid.  This error can be found by valgrind too...

==3298==    at 0x6B99BA: ptid_equal (ptid.c:80)
==3298==    by 0x4C67FF: get_current_thread (remote.c:3484)
==3298==    by 0x4C6951: add_current_inferior_and_thread (remote.c:3511)
==3298==    by 0x4C762C: extended_remote_create_inferior (remote.c:8506)
==3298==    by 0x5A5312: run_command_1 (infcmd.c:606)
==3298==    by 0x68B4FB: execute_command (top.c:463)
==3298==    by 0x5C7214: command_handler (event-top.c:494)
==3298==    by 0x5C78A3: command_line_handler (event-top.c:692)
==3298==    by 0x6DEB57: rl_callback_read_char (callback.c:220)
==3298==    by 0x5C7278: rl_callback_read_char_wrapper (event-top.c:171)
==3298==    by 0x5C72C2: stdin_event_handler (event-top.c:432)
==3298==    by 0x5C6194: gdb_wait_for_event (event-loop.c:834)

This patch initialises local variable ptid to null in get_current_thread.
We don't need to initialise ptid in add_current_inferior_and_thread,
so this patch also removes the ptid initialisation.

gdb/ChangeLog.arm:
2016-03-29  Andre Vieira <andre.simoesdiasvieira@arm.com>
  Backport from mainline
  2015-07-17  Yao Qi  <yao.qi@linaro.org>

  * remote.c (get_current_thread): Initialise ptid to null_ptid.
  (add_current_inferior_and_thread): Don't initialise ptid.
2016-03-30 09:23:48 +01:00
Andre Simoes Dias Vieira
24ad6cefb1 Fix for GDB crashing with printf on ARM targets.
gdb/ChangeLog.arm:
2016-02-16  Andre Vieira  <andre.simoesdiasvieira@arm.com>
    Backport from mainline
    2016-02-04  Yao Qi  <yao.qi@linaro.org>

	* remote.c (remote_wait_as): Set rs->waiting_for_stop_reply to
	0 before handling 'F' and set it back afterwards.
2016-03-01 17:08:55 +00:00
Don Breazeal
718b36fead Fix '-data-read-memory-bytes' typo/assertion
Backported to the 7.10 branch per this thread:
https://www.sourceware.org/ml/gdb-patches/2016-02/msg00134.html

This patch fixes a typo in target.c:read_memory_robust, where
it calls read_whatever_is_readable with the function arguments
in the wrong order.  Depending on the address being read, it
can cause an xmalloc with a huge size, resulting in an assertion
failure, or just read something other than what was requested.

The problem only arises when GDB is handling an MI
"-data-read-memory-bytes" request and the initial target_read returns
an error status.  Note that read_memory_robust is only called from
the MI code.

gdb/ChangeLog:

	* gdb/target.c (read_memory_robust): Call
	read_whatever_is_readable with arguments in the correct order.
2016-02-10 15:42:15 -08:00
GDB Administrator
9939a5ae6e Automatic date update in version.in 2016-02-10 00:00:50 +00:00
GDB Administrator
fd25813522 Automatic date update in version.in 2016-02-09 00:00:41 +00:00
GDB Administrator
926ad02804 Automatic date update in version.in 2016-02-08 00:00:30 +00:00
GDB Administrator
b79c959e21 Automatic date update in version.in 2016-02-07 00:00:41 +00:00
GDB Administrator
3127b41ef6 Automatic date update in version.in 2016-02-06 00:00:35 +00:00
GDB Administrator
4ae96edcb3 Automatic date update in version.in 2016-02-05 00:00:41 +00:00
GDB Administrator
ecf717914e Automatic date update in version.in 2016-02-04 00:00:33 +00:00
GDB Administrator
3f4ee8a5af Automatic date update in version.in 2016-02-03 00:00:42 +00:00
GDB Administrator
26a736a1bd Automatic date update in version.in 2016-02-02 00:00:40 +00:00
GDB Administrator
e12287ec8f Automatic date update in version.in 2016-02-01 00:00:35 +00:00
GDB Administrator
8d9612c7d2 Automatic date update in version.in 2016-01-31 00:00:29 +00:00
GDB Administrator
4aea2ee231 Automatic date update in version.in 2016-01-30 00:00:38 +00:00
GDB Administrator
c141f0a87f Automatic date update in version.in 2016-01-29 00:00:35 +00:00
GDB Administrator
9f4cd994a1 Automatic date update in version.in 2016-01-28 00:00:40 +00:00
GDB Administrator
04c2cc8b14 Automatic date update in version.in 2016-01-27 00:00:34 +00:00
GDB Administrator
be3fdbcf93 Automatic date update in version.in 2016-01-26 00:00:43 +00:00
GDB Administrator
e8c8175f2c Automatic date update in version.in 2016-01-25 00:00:34 +00:00
GDB Administrator
7598c6af8f Automatic date update in version.in 2016-01-24 00:00:35 +00:00
GDB Administrator
5e4f127a3a Automatic date update in version.in 2016-01-23 00:00:35 +00:00
GDB Administrator
cec9b48217 Automatic date update in version.in 2016-01-22 00:00:34 +00:00
GDB Administrator
ebee3c7142 Automatic date update in version.in 2016-01-21 00:00:39 +00:00
GDB Administrator
00e38d0ad9 Automatic date update in version.in 2016-01-20 00:00:38 +00:00
GDB Administrator
79ed73a4f1 Automatic date update in version.in 2016-01-19 00:00:38 +00:00
GDB Administrator
2a02aa3e7e Automatic date update in version.in 2016-01-18 00:00:39 +00:00
GDB Administrator
4d048bf3da Automatic date update in version.in 2016-01-17 00:00:32 +00:00
GDB Administrator
57508eebad Automatic date update in version.in 2016-01-16 00:00:36 +00:00
GDB Administrator
42f80d0f68 Automatic date update in version.in 2016-01-15 00:00:32 +00:00
GDB Administrator
ae977c7068 Automatic date update in version.in 2016-01-14 00:00:35 +00:00
GDB Administrator
7deecb84e6 Automatic date update in version.in 2016-01-13 00:00:31 +00:00
GDB Administrator
cabf099ef0 Automatic date update in version.in 2016-01-12 00:00:38 +00:00
GDB Administrator
632f6972dc Automatic date update in version.in 2016-01-11 00:00:33 +00:00
GDB Administrator
eb189df08f Automatic date update in version.in 2016-01-10 00:00:43 +00:00
GDB Administrator
45cc4c5744 Automatic date update in version.in 2016-01-09 00:00:38 +00:00
GDB Administrator
6d94cce9d7 Automatic date update in version.in 2016-01-08 00:00:39 +00:00
GDB Administrator
d89f3b4b12 Automatic date update in version.in 2016-01-07 00:00:35 +00:00
GDB Administrator
17cd0e49a3 Automatic date update in version.in 2016-01-06 00:00:40 +00:00
GDB Administrator
be6c2d9649 Automatic date update in version.in 2016-01-05 00:00:32 +00:00
GDB Administrator
81df50697b Automatic date update in version.in 2016-01-04 00:00:34 +00:00
GDB Administrator
8e53ff3a97 Automatic date update in version.in 2016-01-03 00:00:36 +00:00
GDB Administrator
6492b30f35 Automatic date update in version.in 2016-01-02 00:00:38 +00:00
GDB Administrator
73cfbe61aa Automatic date update in version.in 2016-01-01 00:00:37 +00:00
GDB Administrator
bb043da1cc Automatic date update in version.in 2015-12-31 00:00:36 +00:00
GDB Administrator
d8369898ba Automatic date update in version.in 2015-12-30 00:00:31 +00:00
GDB Administrator
f6add9d488 Automatic date update in version.in 2015-12-29 00:00:35 +00:00
GDB Administrator
79ef53bca6 Automatic date update in version.in 2015-12-28 00:00:40 +00:00
GDB Administrator
e4c8050e78 Automatic date update in version.in 2015-12-27 00:00:37 +00:00
GDB Administrator
63d364e2db Automatic date update in version.in 2015-12-26 00:00:37 +00:00
GDB Administrator
a965854b70 Automatic date update in version.in 2015-12-25 00:00:37 +00:00
GDB Administrator
d9f1c143d1 Automatic date update in version.in 2015-12-24 00:00:32 +00:00
GDB Administrator
6174c80b48 Automatic date update in version.in 2015-12-23 00:00:38 +00:00
GDB Administrator
4fb6d3b0c9 Automatic date update in version.in 2015-12-22 00:00:36 +00:00
GDB Administrator
03c0deb558 Automatic date update in version.in 2015-12-21 00:00:33 +00:00
GDB Administrator
26463ba861 Automatic date update in version.in 2015-12-20 00:00:41 +00:00
GDB Administrator
384152a5f3 Automatic date update in version.in 2015-12-19 00:00:43 +00:00
GDB Administrator
7da8904453 Automatic date update in version.in 2015-12-18 00:00:39 +00:00
GDB Administrator
88cb7d0234 Automatic date update in version.in 2015-12-17 00:00:42 +00:00
GDB Administrator
4adca0e7be Automatic date update in version.in 2015-12-16 00:00:40 +00:00
GDB Administrator
06fed79d51 Automatic date update in version.in 2015-12-15 00:00:44 +00:00
GDB Administrator
e566c9815c Automatic date update in version.in 2015-12-14 00:00:42 +00:00
GDB Administrator
afd74256f0 Automatic date update in version.in 2015-12-13 00:00:33 +00:00
GDB Administrator
6e93b9b3fd Automatic date update in version.in 2015-12-12 00:00:37 +00:00
GDB Administrator
0e585e0288 Automatic date update in version.in 2015-12-11 00:00:39 +00:00
GDB Administrator
56a0f7539e Automatic date update in version.in 2015-12-10 00:00:31 +00:00
GDB Administrator
fa8ff6905a Automatic date update in version.in 2015-12-09 00:00:27 +00:00
GDB Administrator
17c80a94c0 Automatic date update in version.in 2015-12-08 00:00:48 +00:00
GDB Administrator
2ed260f268 Automatic date update in version.in 2015-12-07 00:00:44 +00:00
GDB Administrator
7201fd7c2a Automatic date update in version.in 2015-12-06 00:00:37 +00:00
Joel Brobecker
40dfe024f9 Bump GDB version number to 7.10.1.DATE-cvs.
gdb/ChangeLog:

	* version.in: Set GDB version number to 7.10.1.DATE-cvs.
2015-12-05 16:34:00 +01:00
Joel Brobecker
bf7e6b0598 Document the GDB 7.10.1 release in gdb/ChangeLog
gdb/ChangeLog:

	GDB 7.10.1 released.
2015-12-05 16:29:06 +01:00
17 changed files with 155 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
#define BFD_VERSION_DATE 20151205
#define BFD_VERSION_DATE 20160923
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@

View File

@@ -1,3 +1,16 @@
2015-11-19 Don Breazeal <donb@codesourcery.com>
* target.c (read_memory_robust): Call read_whatever_is_readable
with arguments in the correct order.
2015-12-05 Joel Brobecker <brobecker@adacore.com>
* version.in: Set GDB version number to 7.10.1.DATE-cvs.
2015-12-05 Joel Brobecker <brobecker@adacore.com>
GDB 7.10.1 released.
2015-12-05 Joel Brobecker <brobecker@adacore.com>
* version.in: Set GDB version number to 7.10.1.

30
gdb/ChangeLog.arm Normal file
View File

@@ -0,0 +1,30 @@
2016-06-20 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2016-05-23 Yao Qi <yao.qi@arm.com>
* arch-utils.c (default_code_of_frame_writable): New function.
* arch-utils.h (default_code_of_frame_writable): Declare.
* arm-tdep.c (arm_code_of_frame_writable): New function.
(arm_gdbarch_init): Install gdbarch method
code_of_frame_writable if the target is M-profile.
* frame.c (skip_unwritable_frames): New function.
* frame.h (skip_unwritable_frames): Declare.
* gdbarch.sh (code_of_frame_writable): New.
* gdbarch.c, gdbarch.h: Re-generated.
* infcmd.c (finish_command): Call skip_unwritable_frames.
2016-03-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
Backport from mainline
2015-07-17 Yao Qi <yao.qi@linaro.org>
* remote.c (get_current_thread): Initialise ptid to null_ptid.
(add_current_inferior_and_thread): Don't initialise ptid.
2016-02-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
Backport from mainline
2016-02-04 Yao Qi <yao.qi@linaro.org>
* remote.c (remote_wait_as): Set rs->waiting_for_stop_reply to
0 before handling 'F' and set it back afterwards.

View File

@@ -132,6 +132,13 @@ generic_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
return 0;
}
int
default_code_of_frame_writable (struct gdbarch *gdbarch,
struct frame_info *frame)
{
return 1;
}
/* Helper functions for gdbarch_inner_than */
int

View File

@@ -107,6 +107,9 @@ extern int generic_in_solib_return_trampoline (struct gdbarch *gdbarch,
extern int generic_stack_frame_destroyed_p (struct gdbarch *gdbarch,
CORE_ADDR pc);
extern int default_code_of_frame_writable (struct gdbarch *gdbarch,
struct frame_info *frame);
/* By default, registers are not convertible. */
extern int generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
struct type *type);

View File

@@ -9903,6 +9903,22 @@ arm_register_g_packet_guesses (struct gdbarch *gdbarch)
/* Otherwise we don't have a useful guess. */
}
/* Implement the code_of_frame_writable gdbarch method. */
static int
arm_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
{
if (gdbarch_tdep (gdbarch)->is_m
&& get_frame_type (frame) == SIGTRAMP_FRAME)
{
/* M-profile exception frames return to some magic PCs, where
isn't writable at all. */
return 0;
}
else
return 1;
}
/* Initialize the current architecture based on INFO. If possible,
re-use an architecture from ARCHES, which is a list of
@@ -10353,6 +10369,9 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
set_gdbarch_frame_align (gdbarch, arm_frame_align);
if (is_m)
set_gdbarch_code_of_frame_writable (gdbarch, arm_code_of_frame_writable);
set_gdbarch_write_pc (gdbarch, arm_write_pc);
/* Frame handling. */

View File

@@ -438,6 +438,19 @@ skip_artificial_frames (struct frame_info *frame)
return frame;
}
struct frame_info *
skip_unwritable_frames (struct frame_info *frame)
{
while (gdbarch_code_of_frame_writable (get_frame_arch (frame), frame) == 0)
{
frame = get_prev_frame (frame);
if (frame == NULL)
break;
}
return frame;
}
/* Compute the frame's uniq ID that can be used to, later, re-find the
frame. */

View File

@@ -814,4 +814,9 @@ extern struct frame_info *create_new_frame (CORE_ADDR base, CORE_ADDR pc);
extern int frame_unwinder_is (struct frame_info *fi,
const struct frame_unwind *unwinder);
/* Return the first frame above FRAME or FRAME of which the code is
writable. */
extern struct frame_info *skip_unwritable_frames (struct frame_info *frame);
#endif /* !defined (FRAME_H) */

View File

@@ -204,6 +204,7 @@ struct gdbarch
gdbarch_push_dummy_call_ftype *push_dummy_call;
int call_dummy_location;
gdbarch_push_dummy_code_ftype *push_dummy_code;
gdbarch_code_of_frame_writable_ftype *code_of_frame_writable;
gdbarch_print_registers_info_ftype *print_registers_info;
gdbarch_print_float_info_ftype *print_float_info;
gdbarch_print_vector_info_ftype *print_vector_info;
@@ -384,6 +385,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
gdbarch->deprecated_fp_regnum = -1;
gdbarch->call_dummy_location = AT_ENTRY_POINT;
gdbarch->code_of_frame_writable = default_code_of_frame_writable;
gdbarch->print_registers_info = default_print_registers_info;
gdbarch->print_float_info = default_print_float_info;
gdbarch->register_sim_regno = legacy_register_sim_regno;
@@ -539,6 +541,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of push_dummy_call, has predicate. */
/* Skip verify of call_dummy_location, invalid_p == 0 */
/* Skip verify of push_dummy_code, has predicate. */
/* Skip verify of code_of_frame_writable, invalid_p == 0 */
/* Skip verify of print_registers_info, invalid_p == 0 */
/* Skip verify of print_float_info, invalid_p == 0 */
/* Skip verify of print_vector_info, has predicate. */
@@ -788,6 +791,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: char_signed = %s\n",
plongest (gdbarch->char_signed));
fprintf_unfiltered (file,
"gdbarch_dump: code_of_frame_writable = <%s>\n",
host_address_to_string (gdbarch->code_of_frame_writable));
fprintf_unfiltered (file,
"gdbarch_dump: coff_make_msymbol_special = <%s>\n",
host_address_to_string (gdbarch->coff_make_msymbol_special));
@@ -2260,6 +2266,23 @@ set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
gdbarch->push_dummy_code = push_dummy_code;
}
int
gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->code_of_frame_writable != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_code_of_frame_writable called\n");
return gdbarch->code_of_frame_writable (gdbarch, frame);
}
void
set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch,
gdbarch_code_of_frame_writable_ftype code_of_frame_writable)
{
gdbarch->code_of_frame_writable = code_of_frame_writable;
}
void
gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
{

View File

@@ -382,6 +382,12 @@ typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE
extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache);
extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
/* Return true if the code of FRAME is writable. */
typedef int (gdbarch_code_of_frame_writable_ftype) (struct gdbarch *gdbarch, struct frame_info *frame);
extern int gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_code_of_frame_writable (struct gdbarch *gdbarch, gdbarch_code_of_frame_writable_ftype *code_of_frame_writable);
typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);

View File

@@ -478,6 +478,9 @@ M:CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, C
v:int:call_dummy_location::::AT_ENTRY_POINT::0
M:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache:sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache
# Return true if the code of FRAME is writable.
m:int:code_of_frame_writable:struct frame_info *frame:frame::default_code_of_frame_writable::0
m:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all::default_print_registers_info::0
m:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args::default_print_float_info::0
M:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args

View File

@@ -1902,7 +1902,14 @@ finish_command (char *arg, int from_tty)
if (execution_direction == EXEC_REVERSE)
finish_backward (function);
else
finish_forward (function, frame);
{
frame = skip_unwritable_frames (frame);
if (frame == NULL)
error (_("Cannot find the caller frame."));
finish_forward (function, frame);
}
}

View File

@@ -3507,7 +3507,7 @@ stop_reply_extract_thread (char *stop_reply)
static ptid_t
get_current_thread (char *wait_status)
{
ptid_t ptid;
ptid_t ptid = null_ptid;
/* Note we don't use remote_parse_stop_reply as that makes use of
the target architecture, which we haven't yet fully determined at
@@ -3536,7 +3536,7 @@ add_current_inferior_and_thread (char *wait_status)
{
struct remote_state *rs = get_remote_state ();
int fake_pid_p = 0;
ptid_t ptid = null_ptid;
ptid_t ptid;
inferior_ptid = null_ptid;
@@ -6359,8 +6359,16 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options)
status->value.sig = GDB_SIGNAL_0;
break;
case 'F': /* File-I/O request. */
/* GDB may access the inferior memory while handling the File-I/O
request, but we don't want GDB accessing memory while waiting
for a stop reply. See the comments in putpkt_binary. Set
waiting_for_stop_reply to 0 temporarily. */
rs->waiting_for_stop_reply = 0;
remote_fileio_request (buf, rs->ctrlc_pending_p);
rs->ctrlc_pending_p = 0;
/* GDB handled the File-I/O request, and the target is running
again. Keep waiting for events. */
rs->waiting_for_stop_reply = 1;
break;
case 'T': case 'S': case 'X': case 'W':
{

View File

@@ -1822,8 +1822,9 @@ read_memory_robust (struct target_ops *ops,
/* Got an error reading full chunk. See if maybe we can read
some subrange. */
xfree (buffer);
read_whatever_is_readable (ops, offset + xfered_total, unit_size,
offset + xfered_total + to_read, &result);
read_whatever_is_readable (ops, offset + xfered_total,
offset + xfered_total + to_read,
unit_size, &result);
xfered_total += to_read;
}
else

View File

@@ -0,0 +1,7 @@
2016-04-05 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from master
2015-12-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
* lib/mi-support.exp (mi_run_cmd_full): Add an expect for the CLI jump
case.

View File

@@ -900,6 +900,9 @@ proc mi_run_cmd_full {use_mi_command args} {
# to better handle RUN.
send_gdb "jump *$start\n"
warning "Using CLI jump command, expect run-to-main FAIL"
gdb_expect {
-re "${run_match}&\"jump \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
}
return 0
}

View File

@@ -1 +1 @@
7.10.1
7.10.1.DATE-cvs