Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] -data-list-changed-registers
@ 2005-06-01 11:12 Nick Roberts
  2005-06-03 19:13 ` Daniel Jacobowitz
  0 siblings, 1 reply; 17+ messages in thread
From: Nick Roberts @ 2005-06-01 11:12 UTC (permalink / raw)
  To: gdb-patches


Currently the GDB/MI command -data-list-changed-registers gives an internal
error if there is no stack i.e when there is no inferior process:

nickrob/91 ~/src/gdb/gdb -i=mi myprog
~"GNU gdb 6.3.50.20050527-cvs\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\n
"
~"welcome to change it and/or distribute copies of it under certain conditions.\
n"
~"Type \"show copying\" to see the conditions.\n"
~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\
n"
~"This GDB was configured as \"i586-pc-linux-gnu\"..."
~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
~"\n"
(gdb) 
-data-list-changed-registers
~"frame.c:616: internal-error: frame_register: Assertion `frame != NULL && frame
->next != NULL' failed.\n"
~"A problem internal to GDB has been detected,\n"
~"further debugging may prove unreliable.\n"
~"Quit this debugging session? (y or n) "
~"\n"
~"frame.c:616: internal-error: frame_register: Assertion `frame != NULL && frame
->next != NULL' failed.\n"
~"A problem internal to GDB has been detected,\n"
~"further debugging may prove unreliable.\n"
~"Create a core file of GDB? (y or n) "

This patch changes the output to:

-data-list-changed-registers
^error,msg="mi_cmd_data_list_changed_registers: No registers."
(gdb) 


Nick


2005-06-01  Nick Roberts  <nickrob@snap.net.nz>

	* mi/mi-main.c (mi_cmd_data_list_changed_registers): Test for
	registers.


*** /home/nick/src/gdb/mi/mi-main.c.~1.78.~	2005-05-27 12:27:29.000000000 +1200
--- /home/nick/src/gdb/mi/mi-main.c	2005-06-01 22:59:47.000000000 +1200
***************
*** 331,336 ****
--- 331,342 ----
  
    cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changed-registers");
  
+   if (!target_has_registers)
+     {
+       mi_error_message = xstrprintf ("mi_cmd_data_list_changed_registers: No registers.");
+       return MI_CMD_ERROR;
+     }
+ 
    if (argc == 0)		/* No args, just do all the regs */
      {
        for (regnum = 0;


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-06-17  3:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-01 11:12 [PATCH] -data-list-changed-registers Nick Roberts
2005-06-03 19:13 ` Daniel Jacobowitz
2005-06-03 22:35   ` Nick Roberts
2005-06-03 22:36     ` Daniel Jacobowitz
2005-06-04 11:41       ` Nick Roberts
2005-06-06 20:44         ` Nick Roberts
2005-06-11  5:54           ` Nick Roberts
2005-06-11  6:50           ` [PATCH] -data-list-changed-registers (Take 2) Nick Roberts
2005-06-13  2:40             ` Daniel Jacobowitz
2005-06-13  4:47               ` Nick Roberts
2005-06-13 13:48                 ` Daniel Jacobowitz
2005-06-13 22:38                   ` Nick Roberts
2005-06-13 22:42                     ` Daniel Jacobowitz
2005-06-14  2:45                       ` Nick Roberts
2005-06-17  1:51                         ` Daniel Jacobowitz
2005-06-17  3:13                           ` Nick Roberts
2005-06-17  3:22                             ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox