aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1995-05-11 02:26:00 +0000
committerStu Grossman <grossman@cygnus>1995-05-11 02:26:00 +0000
commitd8afcce964c862098004e98eb09318267b5a464c (patch)
tree08f8f2e01c8a9fae2d82645284fce9ec19201c90 /gdb/hppa-tdep.c
parent1818c417af463d6f00400e000998166acfa2b1a7 (diff)
downloadfsf-binutils-gdb-d8afcce964c862098004e98eb09318267b5a464c.zip
fsf-binutils-gdb-d8afcce964c862098004e98eb09318267b5a464c.tar.gz
fsf-binutils-gdb-d8afcce964c862098004e98eb09318267b5a464c.tar.bz2
* hppa-tdep.c (read_unwind_info): Cosmetic cleanup.
* (unwind_command): Clean it up and make it print things out nicer. * monitor.c: Add ^C handling capability (mostly ripped off from remote.c). * (monitor_printf): Make it check the command echo. * (monitor_printf_noecho): Similar to above, but doesn't check for echo. * (monitor_stop): No longer waits for prompt. That is the job of the caller. This makes things work much better for monitor_wait, which waits for the prompt itself. * (monitor_open): Deal with new monitor_stop semantics. Also, flush input after sending init strings to get rid of junk that may be output. Also, don't always send \r to remote. Use monitor_ops->line_term cuz proper character isn't always \r. * (monitor_fetch_register): Switch to completely different algorithm to deal with lame-ass monitors which put spaces in the middle of numbers, and prompt with a space!!!!! * (monitor_read_memory_single): New routine to be used with monitors that can only return one byte/short/long at a time. This is selected via MO_GETMEM_READ_SINGLE. * (monitor_load_srec): Use monitor_printf_noecho for sending S records. Most targets don't echo them. * (monitor.h): Get rid of cmd_delim. Add line_delim. * op50n-rom.c (op50n_cmds): Fill it up. Make it work. * w89k-rom.c: Change all eols from \r to \n. Change load_resp to ^Q to prevent error message. * config/pa/tm-hppa.h (CALL_DUMMY (for hppro)): Add special instruction sequence at end to make restore_pc_queue happy.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c65
1 files changed, 53 insertions, 12 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 042a07f..b771170 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -377,8 +377,8 @@ read_unwind_info (objfile)
struct obj_unwind_info *ui;
text_offset = ANOFFSET (objfile->section_offsets, 0);
- ui = obstack_alloc (&objfile->psymbol_obstack,
- sizeof (struct obj_unwind_info));
+ ui = (struct obj_unwind_info *)obstack_alloc (&objfile->psymbol_obstack,
+ sizeof (struct obj_unwind_info));
ui->table = NULL;
ui->cache = NULL;
@@ -2610,11 +2610,7 @@ unwind_command (exp, from_tty)
int from_tty;
{
CORE_ADDR address;
- union
- {
- int *foo;
- struct unwind_table_entry *u;
- } xxx;
+ struct unwind_table_entry *u;
/* If we have an expression, evaluate it and use it as the address. */
@@ -2623,16 +2619,61 @@ unwind_command (exp, from_tty)
else
return;
- xxx.u = find_unwind_entry (address);
+ u = find_unwind_entry (address);
- if (!xxx.u)
+ if (!u)
{
- printf_unfiltered ("Can't find unwind table entry for PC 0x%x\n", address);
+ printf_unfiltered ("Can't find unwind table entry for %s\n", exp);
return;
}
- printf_unfiltered ("%08x\n%08X\n%08X\n%08X\n", xxx.foo[0], xxx.foo[1], xxx.foo[2],
- xxx.foo[3]);
+ printf_unfiltered ("unwind_table_entry (0x%x):\n", u);
+
+ printf_unfiltered ("\tregion_start = ");
+ print_address (u->region_start, gdb_stdout);
+
+ printf_unfiltered ("\n\tregion_end = ");
+ print_address (u->region_end, gdb_stdout);
+
+#ifdef __STDC__
+#define pif(FLD) if (u->FLD) printf_unfiltered (" "#FLD);
+#else
+#define pif(FLD) if (u->FLD) printf_unfiltered (" FLD");
+#endif
+
+ printf_unfiltered ("\n\tflags =");
+ pif (Cannot_unwind);
+ pif (Millicode);
+ pif (Millicode_save_sr0);
+ pif (Entry_SR);
+ pif (Args_stored);
+ pif (Variable_Frame);
+ pif (Separate_Package_Body);
+ pif (Frame_Extension_Millicode);
+ pif (Stack_Overflow_Check);
+ pif (Two_Instruction_SP_Increment);
+ pif (Ada_Region);
+ pif (Save_SP);
+ pif (Save_RP);
+ pif (Save_MRP_in_frame);
+ pif (extn_ptr_defined);
+ pif (Cleanup_defined);
+ pif (MPE_XL_interrupt_marker);
+ pif (HP_UX_interrupt_marker);
+ pif (Large_frame);
+
+ putchar_unfiltered ('\n');
+
+#ifdef __STDC__
+#define pin(FLD) printf_unfiltered ("\t"#FLD" = 0x%x\n", u->FLD);
+#else
+#define pin(FLD) printf_unfiltered ("\tFLD = 0x%x\n", u->FLD);
+#endif
+
+ pin (Region_description);
+ pin (Entry_FR);
+ pin (Entry_GR);
+ pin (Total_frame_size);
}
#endif /* MAINTENANCE_CMDS */