#include "osdata.h"
#include "gdbsupport/gdb_splay_tree.h"
#include "tracepoint.h"
-#include "ctf.h"
#include "ada-lang.h"
#include "linespec.h"
#include "extension.h"
int skip_unavailable);
/* Controls whether the frontend wants MI in async mode. */
-static int mi_async = 0;
+static bool mi_async = false;
/* The set command writes to this variable. If the inferior is
executing, mi_async is *not* updated. */
-static int mi_async_1 = 0;
+static bool mi_async_1 = false;
static void
set_mi_async_command (const char *args, int from_tty,
proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
}
-static int
-proceed_thread_callback (struct thread_info *thread, void *arg)
-{
- int pid = *(int *)arg;
-
- proceed_thread (thread, pid);
- return 0;
-}
-
static void
exec_continue (char **argv, int argc)
{
pid = inf->pid;
}
- iterate_over_threads (proceed_thread_callback, &pid);
+
+ /* Proceed the threads in global number order. This is not necessary,
+ it's just to avoid breaking some tests like gdb.mi/mi-nsintrall.exp
+ that expect the *running notifications in that order. In the end,
+ we should instead fix the test to accept the notifications in any
+ order. */
+ std::vector<thread_info *> threads;
+ for (thread_info *tp : all_threads ())
+ threads.push_back (tp);
+
+ std::sort (threads.begin (), threads.end (),
+ [] (thread_info *a, thread_info *b)
+ {
+ return a->global_num < b->global_num;
+ });
+
+ for (thread_info *tp : threads)
+ proceed_thread (tp, pid);
}
else
{
ui_out_emit_list list_emitter (uiout, field_name);
auto cores = make_unique_xstrdup (xcores);
char *p = cores.get ();
+ char *saveptr;
- for (p = strtok (p, ","); p; p = strtok (NULL, ","))
+ for (p = strtok_r (p, ",", &saveptr); p; p = strtok_r (NULL, ",", &saveptr))
uiout->field_string (NULL, p);
}
the ``x'' command.
WORD-SIZE: size of each ``word''; 1,2,4, or 8 bytes.
NR_ROW: Number of rows.
- NR_COL: The number of colums (words per row).
+ NR_COL: The number of columns (words per row).
ASCHAR: (OPTIONAL) Append an ascii character dump to each row. Use
ASCHAR for unprintable characters.
Reads SIZE*NR_ROW*NR_COL bytes starting at ADDR from memory and
- displayes them. Returns:
+ displays them. Returns:
{addr="...",rowN={wordN="..." ,... [,ascii="..."]}, ...}
uiout->field_core_addr ("next-page", gdbarch, addr + total_bytes);
uiout->field_core_addr ("prev-page", gdbarch, addr - total_bytes);
- /* Build the result as a two dimentional table. */
+ /* Build the result as a two dimensional table. */
{
int row;
int row_byte;