Fetch the NT_ARM_TLS register set for native FreeBSD/arm processes.
[binutils-gdb.git] / gdb / infcmd.c
index b76345d8426ca329a48e4725a81108bebc8d3327..e909d4d4c818f0c221ab73e1ab7badf38424c10c 100644 (file)
@@ -238,6 +238,9 @@ post_create_inferior (int from_tty)
   /* Be sure we own the terminal in case write operations are performed.  */ 
   target_terminal::ours_for_output ();
 
+  infrun_debug_show_threads ("threads in the newly created inferior",
+                            current_inferior ()->non_exited_threads ());
+
   /* If the target hasn't taken care of this already, do it now.
      Targets which need to access registers during to_open,
      to_create_inferior, or to_attach should do it earlier; but many
@@ -454,6 +457,9 @@ run_command_1 (const char *args, int from_tty, enum run_how run_how)
      shouldn't refer to run_target again.  */
   run_target = NULL;
 
+  infrun_debug_show_threads ("immediately after create_process",
+                            current_inferior ()->non_exited_threads ());
+
   /* We're starting off a new process.  When we get out of here, in
      non-stop mode, finish the state of all threads of that process,
      but leave other threads alone, as they may be stopped in internal
@@ -979,9 +985,9 @@ prepare_one_step (thread_info *tp, struct step_command_fsm *sm)
              symbol *sym = inline_skipped_symbol (tp);
              if (sym->aclass () == LOC_BLOCK)
                {
-                 const block *block = SYMBOL_BLOCK_VALUE (sym);
-                 if (BLOCK_END (block) < tp->control.step_range_end)
-                   tp->control.step_range_end = BLOCK_END (block);
+                 const block *block = sym->value_block ();
+                 if (block->end () < tp->control.step_range_end)
+                   tp->control.step_range_end = block->end ();
                }
            }
 
@@ -1086,7 +1092,7 @@ jump_command (const char *arg, int from_tty)
       struct obj_section *section;
 
       fixup_symbol_section (sfn, 0);
-      section = sfn->obj_section (symbol_objfile (sfn));
+      section = sfn->obj_section (sfn->objfile ());
       if (section_is_overlay (section)
          && !section_is_mapped (section))
        {
@@ -1336,7 +1342,7 @@ until_next_command (int from_tty)
       if (msymbol.minsym == NULL)
        error (_("Execution is not within a known function."));
 
-      tp->control.step_range_start = BMSYMBOL_VALUE_ADDRESS (msymbol);
+      tp->control.step_range_start = msymbol.value_address ();
       /* The upper-bound of step_range is exclusive.  In order to make PC
         within the range, set the step_range_end with PC + 1.  */
       tp->control.step_range_end = pc + 1;
@@ -1345,7 +1351,7 @@ until_next_command (int from_tty)
     {
       sal = find_pc_line (pc, 0);
 
-      tp->control.step_range_start = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (func));
+      tp->control.step_range_start = func->value_block ()->entry_pc ();
       tp->control.step_range_end = sal.end;
 
       /* By setting the step_range_end based on the current pc, we are
@@ -2295,17 +2301,17 @@ registers_info (const char *addr_exp, int fpregs)
 
       /* A register group?  */
       {
-       struct reggroup *group;
-
-       for (group = reggroup_next (gdbarch, NULL);
-            group != NULL;
-            group = reggroup_next (gdbarch, group))
+       const struct reggroup *group = nullptr;
+       for (const struct reggroup *g : gdbarch_reggroups (gdbarch))
          {
            /* Don't bother with a length check.  Should the user
               enter a short register group name, go with the first
               group that matches.  */
-           if (strncmp (start, reggroup_name (group), end - start) == 0)
-             break;
+           if (strncmp (start, g->name (), end - start) == 0)
+             {
+               group = g;
+               break;
+             }
          }
        if (group != NULL)
          {
@@ -2589,17 +2595,8 @@ attach_command (const char *args, int from_tty)
      shouldn't refer to attach_target again.  */
   attach_target = NULL;
 
-  if (debug_infrun)
-    {
-      infrun_debug_printf ("immediately after attach:");
-      for (thread_info *thread : inferior->non_exited_threads ())
-       infrun_debug_printf ("  thread %s, executing = %d, resumed = %d, "
-                            "state = %s",
-                            thread->ptid.to_string ().c_str (),
-                            thread->executing (),
-                            thread->resumed (),
-                            thread_state_string (thread->state));
-    }
+  infrun_debug_show_threads ("immediately after attach",
+                            current_inferior ()->non_exited_threads ());
 
   /* Enable async mode if it is supported by the target.  */
   if (target_can_async_p ())