Committed after testing and independent approval/endorsement.
[deliverable/binutils-gdb.git] / gdb / tracepoint.c
index 855a5b23b422bbcb8f4a9b3930b034b59da898f0..5c85db444bec88aaeaf0af95abb6cd144004f45d 100644 (file)
@@ -38,6 +38,7 @@
 #include "completer.h"
 #include "gdb-events.h"
 #include "block.h"
+#include "dictionary.h"
 
 #include "ax.h"
 #include "ax-gdb.h"
@@ -265,7 +266,7 @@ set_traceframe_context (CORE_ADDR trace_pc)
       set_internalvar (lookup_internalvar ("trace_file"),
                       value_from_pointer (charstar, (LONGEST) 0));
       set_internalvar (lookup_internalvar ("trace_line"),
-                      value_from_pointer (builtin_type_int, (LONGEST) - 1));
+                      value_from_longest (builtin_type_int, (LONGEST) - 1));
       return;
     }
 
@@ -333,7 +334,7 @@ set_traceframe_context (CORE_ADDR trace_pc)
 static struct tracepoint *
 set_raw_tracepoint (struct symtab_and_line sal)
 {
-  register struct tracepoint *t, *tc;
+  struct tracepoint *t, *tc;
   struct cleanup *old_chain;
 
   t = (struct tracepoint *) xmalloc (sizeof (struct tracepoint));
@@ -1115,7 +1116,7 @@ memrange_sortmerge (struct collection_list *memranges)
        {
          if (memranges->list[a].type == memranges->list[b].type &&
              memranges->list[b].start - memranges->list[a].end <=
-             MAX_REGISTER_VIRTUAL_SIZE)
+             MAX_REGISTER_SIZE)
            {
              /* memrange b starts before memrange a ends; merge them.  */
              if (memranges->list[b].end > memranges->list[a].end)
@@ -1214,7 +1215,7 @@ collect_symbol (struct collection_list *collect, struct symbol *sym,
       /* check for doubles stored in two registers */
       /* FIXME: how about larger types stored in 3 or more regs? */
       if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FLT &&
-         len > REGISTER_RAW_SIZE (reg))
+         len > DEPRECATED_REGISTER_RAW_SIZE (reg))
        add_register (collect, reg + 1);
       break;
     case LOC_REF_ARG:
@@ -1289,13 +1290,14 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc,
 {
   struct symbol *sym;
   struct block *block;
-  int i, count = 0;
+  struct dict_iterator iter;
+  int count = 0;
 
   block = block_for_pc (pc);
   while (block != 0)
     {
       QUIT;                    /* allow user to bail out with ^C */
-      ALL_BLOCK_SYMBOLS (block, i, sym)
+      ALL_BLOCK_SYMBOLS (block, iter, sym)
        {
          switch (SYMBOL_CLASS (sym))
            {
@@ -2333,7 +2335,8 @@ scope_info (char *args, int from_tty)
   struct minimal_symbol *msym;
   struct block *block;
   char **canonical, *symname, *save_args = args;
-  int i, j, count = 0;
+  struct dict_iterator iter;
+  int j, count = 0;
 
   if (args == 0 || *args == 0)
     error ("requires an argument (function, line or *addr) to define a scope");
@@ -2349,7 +2352,7 @@ scope_info (char *args, int from_tty)
   while (block != 0)
     {
       QUIT;                    /* allow user to bail out with ^C */
-      ALL_BLOCK_SYMBOLS (block, i, sym)
+      ALL_BLOCK_SYMBOLS (block, iter, sym)
        {
          QUIT;                 /* allow user to bail out with ^C */
          if (count == 0)
@@ -2508,7 +2511,7 @@ trace_dump_command (char *args, int from_tty)
      to the tracepoint PC.  If not, then the current frame was
      collected during single-stepping.  */
 
-  stepping_frame = (t->address != read_pc ());
+  stepping_frame = (t->address != (read_pc () - DECR_PC_AFTER_BREAK));
 
   for (action = t->actions; action; action = action->next)
     {
This page took 0.025675 seconds and 4 git commands to generate.