diff options
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/inferiors.h | 2 | ||||
-rw-r--r-- | gdb/gdbserver/linux-aarch64-low.c | 4 | ||||
-rw-r--r-- | gdb/gdbserver/linux-arm-low.c | 10 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 20 | ||||
-rw-r--r-- | gdb/gdbserver/linux-mips-low.c | 58 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-low.c | 10 | ||||
-rw-r--r-- | gdb/gdbserver/lynx-low.c | 12 | ||||
-rw-r--r-- | gdb/gdbserver/thread-db.c | 42 |
9 files changed, 84 insertions, 79 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 111ed5b..ae35e19 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2015-02-27 Tom Tromey <tromey@redhat.com> + Pedro Alves <palves@redhat.com> + + Rename symbols whose names are reserved C++ keywords throughout. + 2015-02-27 Pedro Alves <palves@redhat.com> * Makefile.in (COMPILER): New, get it from autoconf. diff --git a/gdb/gdbserver/inferiors.h b/gdb/gdbserver/inferiors.h index c75499d..0569586 100644 --- a/gdb/gdbserver/inferiors.h +++ b/gdb/gdbserver/inferiors.h @@ -69,7 +69,7 @@ struct process_info const struct target_desc *tdesc; /* Private target data. */ - struct process_info_private *private; + struct process_info_private *priv; }; #define ptid_of(inf) ((inf)->entry.id) diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c index 6b84042..a34fe5d 100644 --- a/gdb/gdbserver/linux-aarch64-low.c +++ b/gdb/gdbserver/linux-aarch64-low.c @@ -721,7 +721,7 @@ aarch64_get_debug_reg_state () struct process_info *proc; proc = current_process (); - return &proc->private->arch_private->debug_reg_state; + return &proc->priv->arch_private->debug_reg_state; } /* Record the insertion of one breakpoint/watchpoint, as represented @@ -1151,7 +1151,7 @@ aarch64_linux_prepare_to_resume (struct lwp_info *lwp) int tid = ptid_get_lwp (ptid); struct process_info *proc = find_process_pid (ptid_get_pid (ptid)); struct aarch64_debug_reg_state *state - = &proc->private->arch_private->debug_reg_state; + = &proc->priv->arch_private->debug_reg_state; if (show_debug_regs) fprintf (stderr, "prepare_to_resume thread %ld\n", lwpid_of (thread)); diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index 303d9c8..2cd1668 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -590,12 +590,12 @@ arm_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, if (watch) { count = arm_linux_get_hw_watchpoint_count (); - pts = proc->private->arch_private->wpts; + pts = proc->priv->arch_private->wpts; } else { count = arm_linux_get_hw_breakpoint_count (); - pts = proc->private->arch_private->bpts; + pts = proc->priv->arch_private->bpts; } for (i = 0; i < count; i++) @@ -630,12 +630,12 @@ arm_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, if (watch) { count = arm_linux_get_hw_watchpoint_count (); - pts = proc->private->arch_private->wpts; + pts = proc->priv->arch_private->wpts; } else { count = arm_linux_get_hw_breakpoint_count (); - pts = proc->private->arch_private->bpts; + pts = proc->priv->arch_private->bpts; } for (i = 0; i < count; i++) @@ -725,7 +725,7 @@ arm_prepare_to_resume (struct lwp_info *lwp) struct thread_info *thread = get_lwp_thread (lwp); int pid = lwpid_of (thread); struct process_info *proc = find_process_pid (pid_of (thread)); - struct arch_process_info *proc_info = proc->private->arch_private; + struct arch_process_info *proc_info = proc->priv->arch_private; struct arch_lwp_info *lwp_info = lwp->arch_private; int i; diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index c0d3b0d..a278c9a 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -357,13 +357,13 @@ linux_add_process (int pid, int attached) struct process_info *proc; proc = add_process (pid, attached); - proc->private = xcalloc (1, sizeof (*proc->private)); + proc->priv = xcalloc (1, sizeof (*proc->priv)); /* Set the arch when the first LWP stops. */ - proc->private->new_inferior = 1; + proc->priv->new_inferior = 1; if (the_low_target.new_process != NULL) - proc->private->arch_private = the_low_target.new_process (); + proc->priv->arch_private = the_low_target.new_process (); return proc; } @@ -1167,10 +1167,10 @@ linux_mourn (struct process_info *process) find_inferior (&all_threads, delete_lwp_callback, process); /* Freeing all private data. */ - priv = process->private; + priv = process->priv; free (priv->arch_private); free (priv); - process->private = NULL; + process->priv = NULL; remove_process (process); } @@ -1842,7 +1842,7 @@ linux_low_filter_event (int lwpid, int wstat) is stopped for the first time, but before we access any inferior registers. */ proc = find_process_pid (pid_of (thread)); - if (proc->private->new_inferior) + if (proc->priv->new_inferior) { struct thread_info *saved_thread; @@ -1853,7 +1853,7 @@ linux_low_filter_event (int lwpid, int wstat) current_thread = saved_thread; - proc->private->new_inferior = 0; + proc->priv->new_inferior = 0; } } @@ -2757,7 +2757,7 @@ linux_wait_1 (ptid_t ptid, && current_thread->last_resume_kind != resume_step && ( #if defined (USE_THREAD_DB) && !defined (__ANDROID__) - (current_process ()->private->thread_db != NULL + (current_process ()->priv->thread_db != NULL && (WSTOPSIG (w) == __SIGRTMIN || WSTOPSIG (w) == __SIGRTMIN + 1)) || @@ -4821,7 +4821,7 @@ linux_look_up_symbols (void) #ifdef USE_THREAD_DB struct process_info *proc = current_process (); - if (proc->private->thread_db != NULL) + if (proc->priv->thread_db != NULL) return; /* If the kernel supports tracing clones, then we don't need to @@ -5741,7 +5741,7 @@ linux_qxfer_libraries_svr4 (const char *annex, unsigned char *readbuf, { char *document; unsigned document_len; - struct process_info_private *const priv = current_process ()->private; + struct process_info_private *const priv = current_process ()->priv; char filename[PATH_MAX]; int pid, is_elf64; diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c index 478bb6e..f081dda 100644 --- a/gdb/gdbserver/linux-mips-low.c +++ b/gdb/gdbserver/linux-mips-low.c @@ -353,19 +353,19 @@ mips_linux_prepare_to_resume (struct lwp_info *lwp) { ptid_t ptid = ptid_of (get_lwp_thread (lwp)); struct process_info *proc = find_process_pid (ptid_get_pid (ptid)); - struct arch_process_info *private = proc->private->arch_private; + struct arch_process_info *priv = proc->priv->arch_private; if (lwp->arch_private->watch_registers_changed) { /* Only update the watch registers if we have set or unset a watchpoint already. */ - if (mips_linux_watch_get_num_valid (&private->watch_mirror) > 0) + if (mips_linux_watch_get_num_valid (&priv->watch_mirror) > 0) { /* Write the mirrored watch register values. */ int tid = ptid_get_lwp (ptid); if (-1 == ptrace (PTRACE_SET_WATCH_REGS, tid, - &private->watch_mirror)) + &priv->watch_mirror)) perror_with_name ("Couldn't write watch register"); } @@ -395,7 +395,7 @@ mips_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int len, struct raw_breakpoint *bp) { struct process_info *proc = current_process (); - struct arch_process_info *private = proc->private->arch_private; + struct arch_process_info *priv = proc->priv->arch_private; struct pt_watch_regs regs; struct mips_watchpoint *new_watch; struct mips_watchpoint **pw; @@ -406,17 +406,17 @@ mips_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, lwpid = lwpid_of (current_thread); if (!mips_linux_read_watch_registers (lwpid, - &private->watch_readback, - &private->watch_readback_valid, + &priv->watch_readback, + &priv->watch_readback_valid, 0)) return -1; if (len <= 0) return -1; - regs = private->watch_readback; + regs = priv->watch_readback; /* Add the current watches. */ - mips_linux_watch_populate_regs (private->current_watches, ®s); + mips_linux_watch_populate_regs (priv->current_watches, ®s); /* Now try to add the new watch. */ watch_type = raw_bkpt_type_to_target_hw_bp_type (type); @@ -431,12 +431,12 @@ mips_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, new_watch->type = watch_type; new_watch->next = NULL; - pw = &private->current_watches; + pw = &priv->current_watches; while (*pw != NULL) pw = &(*pw)->next; *pw = new_watch; - private->watch_mirror = regs; + priv->watch_mirror = regs; /* Only update the threads of this process. */ pid = pid_of (proc); @@ -453,7 +453,7 @@ mips_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int len, struct raw_breakpoint *bp) { struct process_info *proc = current_process (); - struct arch_process_info *private = proc->private->arch_private; + struct arch_process_info *priv = proc->priv->arch_private; int deleted_one; int pid; @@ -465,7 +465,7 @@ mips_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, /* Search for a known watch that matches. Then unlink and free it. */ watch_type = raw_bkpt_type_to_target_hw_bp_type (type); deleted_one = 0; - pw = &private->current_watches; + pw = &priv->current_watches; while ((w = *pw)) { if (w->addr == addr && w->len == len && w->type == watch_type) @@ -483,11 +483,11 @@ mips_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, /* At this point watch_readback is known to be valid because we could not have added the watch without reading it. */ - gdb_assert (private->watch_readback_valid == 1); + gdb_assert (priv->watch_readback_valid == 1); - private->watch_mirror = private->watch_readback; - mips_linux_watch_populate_regs (private->current_watches, - &private->watch_mirror); + priv->watch_mirror = priv->watch_readback; + mips_linux_watch_populate_regs (priv->current_watches, + &priv->watch_mirror); /* Only update the threads of this process. */ pid = pid_of (proc); @@ -503,21 +503,21 @@ static int mips_stopped_by_watchpoint (void) { struct process_info *proc = current_process (); - struct arch_process_info *private = proc->private->arch_private; + struct arch_process_info *priv = proc->priv->arch_private; int n; int num_valid; long lwpid = lwpid_of (current_thread); if (!mips_linux_read_watch_registers (lwpid, - &private->watch_readback, - &private->watch_readback_valid, + &priv->watch_readback, + &priv->watch_readback_valid, 1)) return 0; - num_valid = mips_linux_watch_get_num_valid (&private->watch_readback); + num_valid = mips_linux_watch_get_num_valid (&priv->watch_readback); for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++) - if (mips_linux_watch_get_watchhi (&private->watch_readback, n) + if (mips_linux_watch_get_watchhi (&priv->watch_readback, n) & (R_MASK | W_MASK)) return 1; @@ -531,7 +531,7 @@ static CORE_ADDR mips_stopped_data_address (void) { struct process_info *proc = current_process (); - struct arch_process_info *private = proc->private->arch_private; + struct arch_process_info *priv = proc->priv->arch_private; int n; int num_valid; long lwpid = lwpid_of (current_thread); @@ -543,28 +543,28 @@ mips_stopped_data_address (void) triggered. */ if (!mips_linux_read_watch_registers (lwpid, - &private->watch_readback, - &private->watch_readback_valid, + &priv->watch_readback, + &priv->watch_readback_valid, 0)) return 0; - num_valid = mips_linux_watch_get_num_valid (&private->watch_readback); + num_valid = mips_linux_watch_get_num_valid (&priv->watch_readback); for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++) - if (mips_linux_watch_get_watchhi (&private->watch_readback, n) + if (mips_linux_watch_get_watchhi (&priv->watch_readback, n) & (R_MASK | W_MASK)) { CORE_ADDR t_low, t_hi; int t_irw; struct mips_watchpoint *watch; - t_low = mips_linux_watch_get_watchlo (&private->watch_readback, n); + t_low = mips_linux_watch_get_watchlo (&priv->watch_readback, n); t_irw = t_low & IRW_MASK; - t_hi = (mips_linux_watch_get_watchhi (&private->watch_readback, n) + t_hi = (mips_linux_watch_get_watchhi (&priv->watch_readback, n) | IRW_MASK); t_low &= ~(CORE_ADDR)t_hi; - for (watch = private->current_watches; + for (watch = priv->current_watches; watch != NULL; watch = watch->next) { diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index e58a7ac..171735c 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -690,7 +690,7 @@ x86_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, enum target_hw_bp_type hw_type = raw_bkpt_type_to_target_hw_bp_type (type); struct x86_debug_reg_state *state - = &proc->private->arch_private->debug_reg_state; + = &proc->priv->arch_private->debug_reg_state; return x86_dr_insert_watchpoint (state, hw_type, addr, size); } @@ -719,7 +719,7 @@ x86_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, enum target_hw_bp_type hw_type = raw_bkpt_type_to_target_hw_bp_type (type); struct x86_debug_reg_state *state - = &proc->private->arch_private->debug_reg_state; + = &proc->priv->arch_private->debug_reg_state; return x86_dr_remove_watchpoint (state, hw_type, addr, size); } @@ -733,7 +733,7 @@ static int x86_stopped_by_watchpoint (void) { struct process_info *proc = current_process (); - return x86_dr_stopped_by_watchpoint (&proc->private->arch_private->debug_reg_state); + return x86_dr_stopped_by_watchpoint (&proc->priv->arch_private->debug_reg_state); } static CORE_ADDR @@ -741,7 +741,7 @@ x86_stopped_data_address (void) { struct process_info *proc = current_process (); CORE_ADDR addr; - if (x86_dr_stopped_data_address (&proc->private->arch_private->debug_reg_state, + if (x86_dr_stopped_data_address (&proc->priv->arch_private->debug_reg_state, &addr)) return addr; return 0; @@ -786,7 +786,7 @@ x86_linux_prepare_to_resume (struct lwp_info *lwp) int pid = ptid_get_pid (ptid); struct process_info *proc = find_process_pid (pid); struct x86_debug_reg_state *state - = &proc->private->arch_private->debug_reg_state; + = &proc->priv->arch_private->debug_reg_state; x86_linux_dr_set (ptid, DR_CONTROL, 0); diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index 98797ba..460346c 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -218,8 +218,8 @@ lynx_add_process (int pid, int attached) proc = add_process (pid, attached); proc->tdesc = lynx_tdesc; - proc->private = xcalloc (1, sizeof (*proc->private)); - proc->private->last_wait_event_ptid = null_ptid; + proc->priv = xcalloc (1, sizeof (*proc->priv)); + proc->priv->last_wait_event_ptid = null_ptid; return proc; } @@ -334,7 +334,7 @@ lynx_resume (struct thread_resume *resume_info, size_t n) unexpected signals (Eg SIG61) when we resume the inferior using a different thread. */ if (ptid_equal (ptid, minus_one_ptid)) - ptid = current_process()->private->last_wait_event_ptid; + ptid = current_process()->priv->last_wait_event_ptid; /* The ptid might still be minus_one_ptid; this can happen between the moment we create the inferior or attach to a process, and @@ -422,7 +422,7 @@ retry: ret = lynx_waitpid (pid, &wstat); new_ptid = lynx_ptid_build (ret, ((union wait *) &wstat)->w_tid); - find_process_pid (ret)->private->last_wait_event_ptid = new_ptid; + find_process_pid (ret)->priv->last_wait_event_ptid = new_ptid; /* If this is a new thread, then add it now. The reason why we do this here instead of when handling new-thread events is because @@ -552,8 +552,8 @@ static void lynx_mourn (struct process_info *proc) { /* Free our private data. */ - free (proc->private); - proc->private = NULL; + free (proc->priv); + proc->priv = NULL; clear_inferiors (); } diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index a8b6f42..5bf808e 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -192,7 +192,7 @@ thread_db_create_event (CORE_ADDR where) td_event_msg_t msg; td_err_e err; struct lwp_info *lwp; - struct thread_db *thread_db = current_process ()->private->thread_db; + struct thread_db *thread_db = current_process ()->priv->thread_db; gdb_assert (thread_db->td_ta_event_getmsg_p != NULL); @@ -228,7 +228,7 @@ thread_db_enable_reporting (void) td_thr_events_t events; td_notify_t notify; td_err_e err; - struct thread_db *thread_db = current_process ()->private->thread_db; + struct thread_db *thread_db = current_process ()->priv->thread_db; if (thread_db->td_ta_set_event_p == NULL || thread_db->td_ta_event_addr_p == NULL @@ -272,7 +272,7 @@ find_one_thread (ptid_t ptid) td_err_e err; struct thread_info *inferior; struct lwp_info *lwp; - struct thread_db *thread_db = current_process ()->private->thread_db; + struct thread_db *thread_db = current_process ()->priv->thread_db; int lwpid = ptid_get_lwp (ptid); inferior = (struct thread_info *) find_inferior_id (&all_threads, ptid); @@ -352,7 +352,7 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p) if (thread_db_use_events) { td_err_e err; - struct thread_db *thread_db = proc->private->thread_db; + struct thread_db *thread_db = proc->priv->thread_db; err = thread_db->td_thr_event_enable_p (th_p, 1); if (err != TD_OK) @@ -391,7 +391,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) { td_thrinfo_t ti; td_err_e err; - struct thread_db *thread_db = current_process ()->private->thread_db; + struct thread_db *thread_db = current_process ()->priv->thread_db; err = thread_db->td_thr_get_info_p (th_p, &ti); if (err != TD_OK) @@ -430,7 +430,7 @@ thread_db_find_new_threads (void) { td_err_e err; ptid_t ptid = current_ptid; - struct thread_db *thread_db = current_process ()->private->thread_db; + struct thread_db *thread_db = current_process ()->priv->thread_db; int loop, iteration; /* This function is only called when we first initialize thread_db. @@ -476,7 +476,7 @@ thread_db_find_new_threads (void) static void thread_db_look_up_symbols (void) { - struct thread_db *thread_db = current_process ()->private->thread_db; + struct thread_db *thread_db = current_process ()->priv->thread_db; const char **sym_list; CORE_ADDR unused; @@ -491,7 +491,7 @@ thread_db_look_up_symbols (void) int thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp) { - struct thread_db *thread_db = current_process ()->private->thread_db; + struct thread_db *thread_db = current_process ()->priv->thread_db; int may_ask_gdb = !thread_db->all_symbols_looked_up; /* If we've passed the call to thread_db_look_up_symbols, then @@ -514,7 +514,7 @@ thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset, struct thread_db *thread_db; proc = get_thread_process (thread); - thread_db = proc->private->thread_db; + thread_db = proc->priv->thread_db; /* If the thread layer is not (yet) initialized, fail. */ if (thread_db == NULL || !thread_db->all_symbols_looked_up) @@ -575,10 +575,10 @@ thread_db_load_search (void) struct thread_db *tdb; struct process_info *proc = current_process (); - gdb_assert (proc->private->thread_db == NULL); + gdb_assert (proc->priv->thread_db == NULL); tdb = xcalloc (1, sizeof (*tdb)); - proc->private->thread_db = tdb; + proc->priv->thread_db = tdb; tdb->td_ta_new_p = &td_ta_new; @@ -589,7 +589,7 @@ thread_db_load_search (void) if (debug_threads) debug_printf ("td_ta_new(): %s\n", thread_db_err_str (err)); free (tdb); - proc->private->thread_db = NULL; + proc->priv->thread_db = NULL; return 0; } @@ -620,10 +620,10 @@ try_thread_db_load_1 (void *handle) struct thread_db *tdb; struct process_info *proc = current_process (); - gdb_assert (proc->private->thread_db == NULL); + gdb_assert (proc->priv->thread_db == NULL); tdb = xcalloc (1, sizeof (*tdb)); - proc->private->thread_db = tdb; + proc->priv->thread_db = tdb; tdb->handle = handle; @@ -640,7 +640,7 @@ try_thread_db_load_1 (void *handle) if (required) \ { \ free (tdb); \ - proc->private->thread_db = NULL; \ + proc->priv->thread_db = NULL; \ return 0; \ } \ } \ @@ -656,7 +656,7 @@ try_thread_db_load_1 (void *handle) if (debug_threads) debug_printf ("td_ta_new(): %s\n", thread_db_err_str (err)); free (tdb); - proc->private->thread_db = NULL; + proc->priv->thread_db = NULL; return 0; } @@ -909,7 +909,7 @@ switch_to_process (struct process_info *proc) static void disable_thread_event_reporting (struct process_info *proc) { - struct thread_db *thread_db = proc->private->thread_db; + struct thread_db *thread_db = proc->priv->thread_db; if (thread_db) { td_err_e (*td_ta_clear_event_p) (const td_thragent_t *ta, @@ -941,7 +941,7 @@ disable_thread_event_reporting (struct process_info *proc) static void remove_thread_event_breakpoints (struct process_info *proc) { - struct thread_db *thread_db = proc->private->thread_db; + struct thread_db *thread_db = proc->priv->thread_db; if (thread_db->td_create_bp != NULL) { @@ -959,7 +959,7 @@ remove_thread_event_breakpoints (struct process_info *proc) void thread_db_detach (struct process_info *proc) { - struct thread_db *thread_db = proc->private->thread_db; + struct thread_db *thread_db = proc->priv->thread_db; if (thread_db) { @@ -973,7 +973,7 @@ thread_db_detach (struct process_info *proc) void thread_db_mourn (struct process_info *proc) { - struct thread_db *thread_db = proc->private->thread_db; + struct thread_db *thread_db = proc->priv->thread_db; if (thread_db) { td_err_e (*td_ta_delete_p) (td_thragent_t *); @@ -992,7 +992,7 @@ thread_db_mourn (struct process_info *proc) #endif /* USE_LIBTHREAD_DB_DIRECTLY */ free (thread_db); - proc->private->thread_db = NULL; + proc->priv->thread_db = NULL; } } |