]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
55a8c076
YQ
12012-04-14 Yao Qi <yao@codesourcery.com>
2
3 Import gnulib module inttypes.
4 * aclocal.m4, config.in, configure: Regenerated.
5
dc750257
YQ
62012-04-14 Yao Qi <yao@codesourcery.com>
7
8 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9 Makefile and config.status at last.
10
0ab5faf9
YQ
112012-04-13 Yao Qi <yao@codesourcery.com>
12
13 * tracepoint.c: Include stdint.h unconditionally.
14
18f5fd81
TJB
152012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
16
17 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
18 on BFD_HAVE_SYS_PROCFS_TYPE.
19 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
20 * configure: Regenerate.
21 * config.in: Likewise.
22
4d47af5c
L
232012-04-13 H.J. Lu <hongjiu.lu@intel.com>
24
25 * Makefile.in (clean): Also remove x32.c x32-linux.c
26 x32-avx.c x32-avx-linux.c.
27 (x32.o): New target.
28 (x32.c): Likewise.
29 (x32-linux.o): Likewise.
30 (x32-linux.c): Likewise.
31 (x32-avx.o): Likewise.
32 (x32-avx.c): Likewise.
33 (x32-avx-linux.o): Likewise.
34 (x32-avx-linux.c): Likewise.
35
36 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
37 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
38 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
39 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
40 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
41 i386/x32-avx-linux.xml.
42
43 * linux-x86-low.c (init_registers_x32_linux): New prototype.
44 (init_registers_x32_avx_linux): Likwise.
45 (x86_linux_update_xmltarget): Call init_registers_x32_linux
46 or init_registers_x32_avx_linux if linux_is_elf64 is false.
47
ecedbe58
PA
482012-04-13 Pedro Alves <palves@redhat.com>
49
50 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
51 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
52 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
53 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
54 the sub-make.
55
c92b5177
L
562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
57
58 * linux-x86-low.c (compat_x32_clock_t): New.
59 (compat_x32_siginfo_t): Likewise.
60 (compat_x32_siginfo_from_siginfo): Likewise.
61 (siginfo_from_compat_x32_siginfo): Likewise.
62 (linux_is_elf64): Likewise.
63 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
64 and siginfo_from_compat_x32_siginfo for x32.
65 (x86_arch_setup): Set linux_is_elf64.
66
214d508e
L
672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
68
69 PR gdb/13969
70 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
71 e_machine field.
72 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
73 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
74 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
75 compatible with process.
76
c9a1864a
YQ
772012-04-12 Yao Qi <yao@codesourcery.com>
78
79 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
80 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
81 (install-only, install-info, clean): Handle sub dir gnulib.
82 (all-lib, am--refresh): New targets.
83 (memmem.o): Remove target.
84 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
85 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
86 (AC_REPLACE_FUNCS): Remove memmem.
87 Invoke gl_INIT and AM_INIT_AUTOMAKE.
88 (AC_OUTPUT): Generate Makefile in gnulib/.
89 * aclocal.m4, config.in, configure: Regenerated.
90
367ba2c2
MR
912012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
92
93 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
94
9d236627
PA
952012-04-05 Pedro Alves <palves@redhat.com>
96
97 -Werror=strict-aliasing
98
99 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
100 pointer.
101
111217b3
PA
1022012-04-04 Pedro Alves <palves@redhat.com>
103
104 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
105 (sparc_store_gregset_from_stack, sparc_store_gregset)
106 (sparc_breakpoint_at): Fix formatting.
107
8365dcf5
TJB
1082012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
109
110 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
111 are available.
112 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
113 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
114 * config.in: Regenerate.
115 * configure: Likewise.
116
689cc2ae
PA
1172012-03-29 Pedro Alves <palves@redhat.com>
118
119 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
120 Correct ptrace arguments.
121
c14dfd32
PA
1222012-03-28 Pedro Alves <palves@redhat.com>
123
124 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
125 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
126 (IA64_FR1_REGNUM): New defines.
127 (ia64_fetch_register): New.
128 (the_low_target): Install it.
129 * linux-low.h (struct linux_target_ops) <fetch_register>: New
130 field.
131 * linux-low.c (linux_fetch_registers): Try the
132 the_low_target.fetch_register hook first.
133
134 * linux-arm-low.c (the_low_target): Adjust.
135 * linux-bfin-low.c (the_low_target): Adjust.
136 * linux-cris-low.c (the_low_target): Adjust.
137 * linux-crisv32-low.c (the_low_target): Adjust.
138 * linux-m32r-low.c (the_low_target): Adjust.
139 * linux-m68k-low.c (the_low_target): Adjust.
140 * linux-mips-low.c (the_low_target): Adjust.
141 * linux-ppc-low.c (the_low_target): Adjust.
142 * linux-s390-low.c (the_low_target): Adjust.
143 * linux-sh-low.c (the_low_target): Adjust.
144 * linux-sparc-low.c (the_low_target): Adjust.
145 * linux-tic6x-low.c (the_low_target): Adjust.
146 * linux-x86-low.c (the_low_target): Adjust.
147 * linux-xtensa-low.c (the_low_target): Adjust.
148
63c88e13
PA
1492012-03-26 Pedro Alves <palves@redhat.com>
150
151 * server.c (handle_qxfer_libraries): Don't bail early if
152 the_target->qxfer_libraries_svr4 is not NULL.
153
fb723180
PA
1542012-03-26 Pedro Alves <palves@redhat.com>
155
156 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
157
0afae3cf
PA
1582012-03-23 Pedro Alves <palves@redhat.com>
159
160 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
161 "library-list-svr4" element's start tag when the the DSO list is
162 empty.
163
485f1ee4
PA
1642012-03-23 Pedro Alves <palves@redhat.com>
165
166 * linux-low.c (read_one_ptr): Read the inferior's pointer through
167 a variable whose type size is the same as the inferior's pointer
168 size.
169
a5362b9a
TS
1702012-03-21 Thomas Schwinge <thomas@codesourcery.com>
171
172 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
173 struct siginfo.
174 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
175 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
176 * linux-low.h: Include <signal.h>.
177 (struct siginfo): Remove forward declaration.
178 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
179 struct siginfo.
180
d226c142
MF
1812012-03-21 Mike Frysinger <vapier@gentoo.org>
182
183 * .gitignore: Ignore more files.
184
122f36ef
PA
1852012-03-19 Pedro Alves <palves@redhat.com>
186 Jan Kratochvil <jan.kratochvil@redhat.com>
187
188 * server.c (cont_thread, general_thread): Add describing comments.
189 (start_inferior): Clear `cont_thread'.
190 (handle_v_cont): Don't set `cont_thread' if resuming all threads
191 of a process.
192
fc3e5175
YQ
1932012-03-15 Yao Qi <yao@codesourcery.com>
194
195 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
196 handling to ...
197 (cmd_qtdp): ... here.
198
8d0d92cd
YQ
1992012-03-15 Yao Qi <yao@codesourcery.com>
200
201 * tracepoint.c (struct tracepoint_action_ops): New.
202 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
203 (m_tracepoint_action_download): New.
204 (r_tracepoint_action_download): New.
205 (x_tracepoint_action_download): New.
206 (l_tracepoint_action_download): New.
207 (add_tracepoint_action): Install `action->ops' according type.
208 (download_tracepoint_1): Move code `download' function pointer
209 of various tracepoint_action_ops.
210
87b0bb13
JK
2112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
212
213 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
214 linux_ptrace_attach_warnings.
215
5f572dec
JK
2162012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
217
218 * Makefile.in (linux-ptrace.o): New.
219 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
220 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
221 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
222 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
223 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
224 of these targets.
225 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
226
f4647387
YQ
2272012-03-08 Yao Qi <yao@codesourcery.com>
228 Pedro Alves <palves@redhat.com>
229
230 Fix PR server/13392.
231 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
232 offset of JMP insn.
233 * tracepoint.c (remove_tracepoint): New.
234 (cmd_qtdp): Call remove_tracepoint when failed to install.
235
9b224c5e
PA
2362012-03-07 Pedro Alves <palves@redhat.com>
237
238 * linux-low.c (get_detach_signal): New.
239 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
240 Pass on pending signals to PTRACE_DETACH. Check the result of the
241 ptrace call.
242 * server.c (program_signals, program_signals_p): New.
243 (handle_general_set): Handle QProgramSignals.
244 * server.h (program_signals, program_signals_p): Declare.
245
e237a7e2
JK
2462012-03-05 Pedro Alves <palves@redhat.com>
247 Jan Kratochvil <jan.kratochvil@redhat.com>
248
249 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
250 New comment why.
251
5808517f
YQ
2522012-03-03 Yao Qi <yao@codesourcery.com>
253
254 * tracepoint.c (tracepoint_look_up_symbols): Update call to
255 agent_look_up_symbols.
256
58b4daa5
YQ
2572012-03-03 Yao Qi <yao@codesourcery.com>
258
259 * Makefile.in (linux-low.o): Keep dependence on agent.h.
260 (linux-x86-low.o): Likewise.
261 * server.h: Remove in_process_agent_loaded.
262 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
263 common/agent.c.
264 Update callers.
265
8ffcbaaf
YQ
2662012-03-03 Yao Qi <yao@codesourcery.com>
267
268 * tracepoint.c (gdb_agent_capability): New global.
269 (in_process_agent_loaded_ust): Renamed to
270 `in_process_agent_supports_ust'.
271 Update callers.
272 (in_process_agent_supports_ust): Call agent_capability_check.
273 (clear_installed_tracepoints): Assert that agent supports
274 agent.
275
d1feda86
YQ
2762012-03-03 Yao Qi <yao@codesourcery.com>
277
278 * linux-low.c (linux_supports_agent): New.
279 (linux_target_ops): Initialize field `supports_agent' with
280 linux_supports_agent.
281 * target.h (struct target_ops) <supports_agent>: New.
282 (target_supports_agent): New macro.
283 * server.c (handle_general_set): Handle packet 'QAgent'.
284 (handle_query): Send `QAgent+'.
285 * Makefile.in (server.o): Depends on agent.h.
286
2fa291ac
YQ
2872012-03-03 Yao Qi <yao@codesourcery.com>
288
289 * Makefile.in (OBS): Add agent.o.
290 Add new rule for agent.o.
291 Track dependence of tracepoint.c on agent.h.
292 * tracepoint.c (run_inferior_command_1):
293 (run_inferior_command): Call agent_run_command.
294 (gdb_ust_connect_sync_socket): Deleted. Move it to
295 common/agent.c.
296 (resume_thread, stop_thread): Likewise.
297 (gdb_ust_socket_init): Renamed to ...
298 (gdb_agent_socket_init): ... New.
299 (gdb_ust_thread): Renamed to ...
300 (gdb_agent_helper_thread): ... New.
301 (gdb_ust_init): Move some code to ...
302 (gdb_agent_init): ... here. New.
303 [HAVE_UST]: Call gdb_ust_init.
304 (initialize_tracepoint_ftlib): Call gdb_agent_init.
305 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
306 * config.in, configure: Regenerated.
307
05044653
PA
3082012-03-02 Pedro Alves <palves@redhat.com>
309
310 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
311 * linux-low.c (struct simple_pid_list): New.
312 (stopped_pids): New a struct simple_pid_list pointer.
313 (add_to_pid_list, pull_pid_from_list): New.
314 (handle_extended_wait): Don't assume the first signal new children
315 report is SIGSTOP. Adjust call to pull_pid_from_list.
316 (linux_wait_for_lwp): Adjust.
317
8d00225b
YQ
3182012-03-02 Yao Qi <yao@codesourcery.com>
319
320 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
321 debug log.
322
19560ba5
YQ
3232012-03-02 Yao Qi <yao@codesourcery.com>
324
325 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
326 `stop_pc' and `tpoint'. Update caller.
327
1faeff08
MR
3282012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
329
330 * linux-low.h (linux_target_ops): Add regset_bitmap member.
331 * linux-low.c (use_linux_regsets): New macro.
332 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
333 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
334 (linux_register_in_regsets): New function.
335 (usr_fetch_inferior_registers): Skip registers covered by
336 regsets.
337 (usr_store_inferior_registers): Likewise.
338 (usr_fetch_inferior_registers): New macro.
339 (usr_store_inferior_registers): Likewise.
340 (linux_fetch_registers): Handle mixed regset/non-regset targets.
341 (linux_store_registers): Likewise.
342 * linux-mips-low.c (init_registers_mips_dsp_linux): New
343 prototype.
344 (init_registers_mips64_dsp_linux): Likewise.
345 (init_registers_mips_linux): New macro.
346 (init_registers_mips_dsp_linux): Likewise.
347 (mips_dsp_num_regs): Likewise.
348 (DSP_BASE, DSP_CONTROL): New fallback macros.
349 (mips_base_regs): New macro.
350 (mips_regmap): Use it. Fix the size.
351 (mips_dsp_regmap): New variable.
352 (mips_dsp_regset_bitmap): Likewise.
353 (mips_arch_setup): New function.
354 (mips_cannot_fetch_register): Use the_low_target.regmap rather
355 than mips_regmap.
356 (mips_cannot_store_register): Likewise.
357 (the_low_target): Update .arch_setup, .num_regs and .regmap
358 initializers. Add .regset_bitmap initializer.
359 * linux-arm-low.c (the_low_target): Add .regset_bitmap
360 initializer.
361 * linux-bfin-low.c (the_low_target): Likewise.
362 * linux-cris-low.c (the_low_target): Likewise.
363 * linux-crisv32-low.c (the_low_target): Likewise.
364 * linux-ia64-low.c (the_low_target): Likewise.
365 * linux-m32r-low.c (the_low_target): Likewise.
366 * linux-m68k-low.c (the_low_target): Likewise.
367 * linux-ppc-low.c (the_low_target): Likewise.
368 * linux-s390-low.c (the_low_target): Likewise.
369 * linux-sh-low.c (the_low_target): Likewise.
370 * linux-sparc-low.c (the_low_target): Likewise.
371 * linux-tic6x-low.c (the_low_target): Likewise.
372 * linux-x86-low.c (the_low_target): Likewise.
373 * linux-xtensa-low.c (the_low_target): Likewise.
374 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
375 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
376 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
377 srv_xmlfiles.
378 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
379 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
380
c03e6ccc
YQ
3812012-02-29 Yao Qi <yao@codesourcery.com>
382 Pedro Alves <palves@redhat.com>
383
384 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
385 `step_over_finished' is true.
386
644cebc9
PA
3872012-02-27 Pedro Alves <palves@redhat.com>
388
389 * linux-low.c (pid_is_stopped): Delete, moved to common/.
390 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
391
c14d7ab2
PA
3922012-02-27 Pedro Alves <palves@redhat.com>
393
394 PR server/9684
395 * linux-low.c (pid_is_stopped): New.
396 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
397
412c89dd
LM
3982012-02-25 Luis Machado <lgustavo@codesourcery.com>
399
400 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
401 of conditions.
402
b745defe
MR
4032012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
404
405 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
406
9f3a5c85
LM
4072012-02-24 Luis Machado <lgustavo@codesourcery>
408
409 * server.c (handle_query): Advertise support for target-side
410 breakpoint condition evaluation.
411 (process_point_options): New function.
412 (process_serial_event): When inserting a breakpoint, check for
413 a target-side condition that should be evaluated.
414
415 * mem-break.c: Include regcache.h and ax.h.
416 (point_cond_list_t): New data structure.
417 (breakpoint) <cond_list>: New field.
418 (find_gdb_breakpoint_at): Make non-static.
419 (delete_gdb_breakpoint_at): Clear any target-side
420 conditions.
421 (clear_gdb_breakpoint_conditions): New function.
422 (add_condition_to_breakpoint): Likewise.
423 (add_breakpoint_condition): Likewise.
424 (gdb_condition_true_at_breakpoint): Likewise.
425 (gdb_breakpoint_here): Return result directly instead
426 of going through a local variable.
427
428 * mem-break.h (find_gdb_breakpoint_at): New prototype.
429 (clear_gdb_breakpoint_conditions): Likewise.
430 (add_breakpoint_condition): Likewise.
431 (gdb_condition_true_at_breakpoint): Likewise.
432
433 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
434 (need_step_over_p): Take target-side breakpoint condition into
435 consideration.
436
5e1dc496
LM
4372012-02-24 Luis Machado <lgustavo@codesourcery>
438
439 * server.h: Include tracepoint.h.
440 (agent_mem_read, agent_get_trace_state_variable_value,
441 agent_set_trace_state_variable_value,
442 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
443 get_set_tsv_func_addr): New prototypes.
444
445 * ax.h: New include file.
446 * ax.c: New source file.
447
448 * tracepoint.c: Include ax.h.
449 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
450 agent_expr, eval_result_type): Move to ax.h.
451 (parse_agent_expr): Rename to ...
452 (gdb_parse_agent_expr): ... this, make it non-static and move
453 to ax.h.
454 (unparse_agent_expr) Rename to ...
455 (gdb_unparse_agent_expr): ... this, make it non-static and move
456 to ax.h.
457 (eval_agent_expr): Rename to ...
458 (eval_tracepoint_agent_expr): ... this.
459 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
460 forward declarations.
461 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
462 (agent_get_trace_state_variable_value): New function.
463 (agent_set_trace_state_variable_value): New function.
464 (cmd_qtdp): Call gdb_parse_agent_expr (...).
465 (response_tracepoint): Call gdb_unparse_agent_expr (...).
466 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
467 (condition_true_at_tracepoint): Likewise.
468 (parse_agent_expr): Rename to ...
469 (gdb_parse_agent_expr): ... this and move to ax.c.
470 (unparse_agent_expr): Rename to ...
471 (gdb_unparse_agent_expr): ... this and move to ax.c.
472 (gdb_agent_op_name): Move to ax.c.
473 (eval_agent_expr): Rename to ...
474 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
475 and move to ax.c.
476 (eval_tracepoint_agent_expr): New function.
477 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
478 non-static.
479 (current_insn_ptr, emit_error, struct bytecode_address): Move to
480 ax.c.
481 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
482 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
483 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
484 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
485 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
486 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
487 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
488 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
489 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
490 (compile_bytecodes): Remove forward declaration.
491 (is_goto_target): Move to ax.c.
492 (compile_bytecodes): Move to ax.c and call
493 agent_get_trace_state_variable_value (...) and
494 agent_set_trace_state_variable_value (...).
495
496 * Makefile.in: Update ax.c and IPA dependencies.
497
277e4e52
PA
4982012-02-24 Pedro Alves <palves@redhat.com>
499
500 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
501 (cmd_bigqtbuffer_circular): ... this. Only handle
502 'QTBuffer:circular:'.
503 (handle_tracepoint_general_set): Adjust.
504
bf4c19f7
YQ
5052012-02-16 Yao Qi <yao@codesourcery.com>
506
507 * inferiors.c: Move code to ...
508 * dll.c: .... here. New.
509 * server.h: Declare clear_dlls.
510 * Makefile.in (SFILES): Add dll.c.
511 (OBS): Add dll.o
512 (dll.o): New rule.
513
d73f2619
YQ
5142012-02-11 Yao Qi <yao@codesourcery.com>
515
516 * server.c: (handle_monitor_command): Add a new parameter
517 `own_buf'.
518 (handle_query): Update caller.
519
f8255c2a
JB
5202012-02-09 Joel Brobecker <brobecker@adacore.com>
521
522 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
523 * configure, config.in: Regenerate.
524 * hostio.c: Provide an alternate implementation if HAVE_READLINK
525 is not defined.
526
da84f473
PA
5272012-02-02 Pedro Alves <palves@redhat.com>
528
529 Try SIGKILL first, then PTRACE_KILL.
530 * linux-low.c (linux_kill_one_lwp): New.
531 (linux_kill_one_lwp): Rename to ...
532 (kill_one_lwp_callback): ... this. Use the new
533 linux_kill_one_lwp.
534
e886a173
PA
5352012-02-02 Pedro Alves <palves@redhat.com>
536
537 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
538 inferior.
539
be07f1a2
PA
5402012-01-27 Pedro Alves <palves@redhat.com>
541
542 * linux-low.c (linux_child_pid_to_exec_file): Delete.
543 (elf_64_file_p): Make static.
544 (linux_pid_exe_is_elf_64_file): New.
545 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
546 Delete declarations.
547 (linux_pid_exe_is_elf_64_file): Declare.
548 * linux-x86-low.c (x86_arch_setup): Use
549 linux_pid_exe_is_elf_64_file.
550
d8301ad1
JK
5512012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
552
553 * linux-low.c (linux_wait_for_event_1): Rename to ...
554 (linux_wait_for_event): ... here and merge it with former
555 linux_wait_for_event - new variable wait_ptid, use it.
556 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
557
01b17894
PA
5582012-01-23 Pedro Alves <palves@redhat.com>
559
560 * server.c (main): Avoid yet another case of infinite loop while
561 detaching/killing after a longjmp.
562
e825046f
JK
5632012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
564
565 Code cleanup.
566 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
567
b9e7b9c3
UW
5682012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
569
570 * hostio.c (handle_readlink): New function.
571 (handle_vFile): Call it to handle "vFile:readlink" packets.
572
901f9912
UW
5732012-01-20 Pedro Alves <palves@redhat.com>
574 Ulrich Weigand <ulrich.weigand@linaro.org>
575
576 * server.c (handle_v_requests): Only support vAttach and vRun to
577 start multiple processes when in extended protocol mode.
578
fc1ab1a0
PA
5792012-01-17 Pedro Alves <palves@redhat.com>
580
581 * tracepoint.c (initialize_tracepoint): Use mmap instead of
582 memalign plus mprotect to allocate the scratch buffer.
583
7d5d4e98
PA
5842012-01-13 Pedro Alves <palves@redhat.com>
585
586 * server.c (attach_inferior): Clear `cont_thread'.
587
f128d5e9
PA
5882012-01-13 Pedro Alves <palves@redhat.com>
589
590 * server.c (main): Avoid infinite loop while detaching/killing
591 after a longjmp.
592
06db92f0
DE
5932012-01-09 Doug Evans <dje@google.com>
594
595 * server.c (start_inferior): Set last_ptid in --wrapper case.
596
32d92999
YQ
5972012-01-06 Yao Qi <yao@codesourcery.com>
598
599 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
600 defined.
601 [IN_PROCESS_AGENT] (debug_agent): New global variable.
602
5e0a92a9
YQ
6032012-01-04 Yao Qi <yao@codesourcery.com>
604
605 * tracepoint.c (cmd_qtdp): Print debug message
606 for static tracepoint.
607
ae639e8c
YQ
6082012-01-04 Yao Qi <yao@codesourcery.com>
609
610 * tracepoint.c (trace_vdebug): Differentiate debug message
611 between gdbserver and IPA.
612
f72429c5
YQ
6132012-01-03 Yao Qi <yao@codesourcery.com>
614
615 * tracepoint.c (tracepoint_was_hit): Don't collect for
616 static tracepoint.
617
12c3e59c
JB
6182012-01-02 Joel Brobecker <brobecker@adacore.com>
619
620 * terminal.h: Reformat copyright header.
621
67827812
JB
6222012-01-02 Joel Brobecker <brobecker@adacore.com>
623
624 * server.c (gdbserver_version): Update copyright year.
625 * gdbreplay.c (gdbreplay_version): Likewise.
626
3e52c33d
JK
6272011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
628
629 * linux-low.c (linux_create_inferior): Put empty if clause for write.
630
631 Revert:
632 2011-12-18 Hui Zhu <teawater@gmail.com>
633 * linux-low.c (linux_create_inferior): Save return value to ret.
634
66f1260e
HZ
6352011-12-18 Hui Zhu <teawater@gmail.com>
636
637 * linux-low.c (linux_create_inferior): Save return value to ret.
638
e77616d7
DE
6392011-12-16 Doug Evans <dje@google.com>
640
e7b06c57
DE
641 * linux-low.c (linux_create_inferior): If stdio connection,
642 redirect stdin from /dev/null, stdout to stderr.
643 * remote-utils.c (remote_is_stdio): New static global.
644 (remote_connection_is_stdio): New function.
645 (remote_prepare): Handle stdio connection.
646 (remote_open): Ditto.
647 (remote_close): Don't close stdin for stdio connections.
648 (read_prim,write_prim): New functions. Replace all calls to
649 read/write to these.
650 * server.c (main): Watch for "-" argument. Move call to
651 remote_prepare before start_inferior.
652 * server.h (STDIO_CONNECTION_NAME): New macro.
653 (remote_connection_is_stdio): Declare.
654
e77616d7
DE
655 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
656 in debugging output.
657
82067193
YQ
6582011-12-15 Yao Qi <yao@codesourcery.com>
659
660 * tracepoint.c: Include sys/syscall.h.
661 (gdb_ust_thread): Remove preprocessor conditional.
662
82bfbe7e
PA
6632011-12-14 Pedro Alves <pedro@codesourcery.com>
664
665 * linux-low.c (linux_detach_one_lwp): Call
666 the_low_target.prepare_to_resume before detaching.
667
712c6575
YQ
6682011-12-14 Yao Qi <yao@codesourcery.com>
669
670 * tracepoint.c (gdb_ust_thread): Don't ignore return value
671 of write.
672
d54d1edf
YQ
6732011-12-14 Yao Qi <yao@codesourcery.com>
674
675 * i386-low.c (i386_low_stopped_data_address): Initialize local
676 variable `control'.
677
6210a125
PA
6782011-12-13 Pedro Alves <pedro@codesourcery.com>
679
680 PR remote/13492
681
682 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
683 DR_CONTROL unless necessary. Extend comments.
684 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
685 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
686
2ece8244
YQ
6872011-12-13 Yao Qi <yao@codesourcery.com>
688
689 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
690 macros.
691 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
692
784867a5
JK
6932011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
694
695 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
696 Print new debug message for such case.
697
6bf36717
JK
6982011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
699
700 Fix overlapping memcpy.
701 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
702 the read_inferior_memory transfer.
703 (delete_fast_tracepoint_jump): New variable buf. Use it for the
704 write_inferior_memory transfer.
705 (set_fast_tracepoint_jump): New variable buf. Use it for the
706 read_inferior_memory and write_inferior_memory transfers.
707 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
708 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
709 Use it for the write_inferior_memory transfer.
710 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
711 buffers.
712
50275556
MR
7132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
714
715 * linux-low.c (fetch_register, store_register): Make code
716 consistent, fix formatting.
717
7325beb4
MR
7182011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
719
720 * linux-low.c (usr_store_inferior_registers): Factor out code
721 to handle individual registers into...
722 (store_register): ... this new function.
723
c642a434
UW
7242011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
725
726 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
727 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
728 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
729 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
730 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
731 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
732 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
733 (srv_xmlfiles): Add new XML files.
734
735 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
736 and <sys/uio.h>.
737 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
738 (init_registers_s390_linux32v1): Add prototype.
739 (init_registers_s390_linux32v2): Likewise.
740 (init_registers_s390_linux64v1): Likewise.
741 (init_registers_s390_linux64v2): Likewise.
742 (init_registers_s390x_linux64v1): Likewise.
743 (init_registers_s390x_linux64v2): Likewise.
744 (s390_num_regs): Increment to 52.
745 (s390_regmap): Add orig_r2 register.
746 (s390_num_regs_3264): Increment to 68.
747 (s390_regmap_3264): Add orig_r2 register.
748 (s390_collect_ptrace_register): Handle orig_r2 register.
749 (s390_supply_ptrace_register): Likewise.
750 (s390_fill_last_break): New function.
751 (s390_store_last_break): Likewise.
752 (s390_fill_system_call): New function.
753 (s390_store_system_call): Likewise.
754 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
755 register sets.
756 (s390_check_regset): New function.
757 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
758 NT_S390_SYSTEM_CALL regsets and use appropriate description.
759 Update target_regsets for available register sets.
760
2268b414
JK
7612011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
762 Jan Kratochvil <jan.kratochvil@redhat.com>
763
764 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
765 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
766 New.
767 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
768 * linux-low.h (struct process_info_private): New member r_debug.
769 * server.c (handle_qxfer_libraries): Call
770 the_target->qxfer_libraries_svr4.
771 (handle_qxfer_libraries_svr4): New function.
772 (qxfer_packets): New entry "libraries-svr4".
773 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
774 * target.h (struct target_ops): New member qxfer_libraries_svr4.
775 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
776 PACKET_qXfer_libraries_svr4.
777
d6db1fab
UW
7782011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
779
780 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
781 PSW address/mask between 8-byte and 16-byte formats.
782 (s390_supply_ptrace_register): Likewise.
783 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
784 basic addressing mode bit.
785
242f5f1c
SS
7862011-11-24 Stan Shebs <stan@codesourcery.com>
787
788 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
789
f196051f
SS
7902011-11-17 Stan Shebs <stan@codesourcery.com>
791
792 * tracepoint.c (struct tracepoint): New field traceframe_usage.
793 (tracing_start_time): New global.
794 (tracing_stop_time): New global.
795 (tracing_user_name): New global.
796 (tracing_notes): New global.
797 (tracing_stop_note): New global.
798 (cmd_qtstart): Set traceframe_usage, start_time.
799 (stop_tracing): Set stop_time.
800 (cmd_qtstatus): Report additional status.
801 (cmd_qtp): New function.
802 (handle_tracepoint_query): Call it.
803 (cmd_qtnotes): New function.
804 (handle_tracepoint_general_set): Call it.
805 (get_timestamp): Rename from tsv_get_timestamp.
806
405f8e94
SS
8072011-11-14 Stan Shebs <stan@codesourcery.com>
808 Kwok Cheung Yeung <kcy@codesourcery.com>
809
810 * linux-x86-low.c (small_jump_insn): New.
811 (i386_install_fast_tracepoint_jump_pad): Add arguments for
812 trampoline and error message, build a trampoline and issue a small
813 jump instruction to it.
814 (x86_install_fast_tracepoint_jump_pad): Add arguments for
815 trampoline and error message.
816 (x86_get_min_fast_tracepoint_insn_len): New.
817 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
818 * linux-low.h (struct linux_target_ops): Add arguments to
819 install_fast_tracepoint_jump_pad operation, add new operation.
820 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
821 arguments.
822 (linux_get_min_fast_tracepoint_insn_len): New function.
823 (linux_target_op): Add new operation.
824 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
825 (gdb_trampoline_buffer_end): Ditto.
826 (gdb_trampoline_buffer_error): Ditto.
827 (struct ipa_sym_addresses): Add fields for new IPA variables.
828 (symbol_list): Add entries for new IPA variables.
829 (struct tracepoint): Add fields to hold the address range of the
830 trampoline used by the tracepoint.
831 (trampoline_buffer_head): New static variable.
832 (trampoline_buffer_tail): Ditto.
833 (claim_trampoline_space): New function.
834 (have_fast_tracepoint_trampoline_buffer): New function.
835 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
836 structure.
837 (install_fast_tracepoint): Ditto, also add error buffer argument.
838 (cmd_qtminftpilen): New function.
839 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
840 (fast_tracepoint_from_trampoline_address): New function.
841 (fast_tracepoint_collecting): Handle trampoline as part of jump
842 pad space.
843 (set_trampoline_buffer_space): New function.
844 (initialize_tracepoint): Initialize new IPA variables.
845 * target.h (struct target_ops): Add arguments to
846 install_fast_tracepoint_jump_pad operation, add new
847 get_min_fast_tracepoint_insn_len operation.
848 (target_get_min_fast_tracepoint_insn_len): New.
849 (install_fast_tracepoint_jump_pad): Add arguments.
850 * server.h (IPA_BUFSIZ): Define.
851 * linux-i386-ipa.c: Include extra header files.
852 (initialize_fast_tracepoint_trampoline_buffer): New function.
853 (initialize_low_tracepoint): Call it.
854 * server.h (set_trampoline_buffer_space): Declare.
855 (claim_trampoline_space): Ditto.
856 (have_fast_tracepoint_trampoline_buffer): Ditto.
857
1e4d1764
YQ
8582011-11-14 Yao Qi <yao@codesourcery.com>
859
860 * server.c (handle_query): Handle InstallInTrace for qSupported.
861 * tracepoint.c (add_tracepoint): Sort list.
862 (install_tracepoint, download_tracepoint): New.
863 (cmd_qtdp): Call them to install and download tracepoints.
864 (sort_tracepoints): Removed.
865 (cmd_qtstart): Update.
866
5c73ff4e
YQ
8672011-11-14 Yao Qi <yao@codesourcery.com>
868
869 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
870 * mem-break.h: Declare.
871 * tracepoint.c (cmd_qtstart): Move some code to ...
872 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
873 New.
874 (download_tracepoints): Move some code to ...
875 (download_tracepoint_1): ... here. New.
876
86a30030
YQ
8772011-11-08 Yao Qi <yao@codesourcery.com>
878
879 * remote-utils.c (relocate_instruction): A comment fix.
880
8d26e50c
JB
8812011-11-07 Joel Brobecker <brobecker@adacore.com>
882
883 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
884 (i386_dr_low_get_control, i386_dr_low_get_status): Use
885 dr_status_mirror and dr_control_mirror from debug_reg_state.
886 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
887 (i386_initial_stuff): Remove use of deleted globals.
888 (i386_get_thread_context, i386_set_thread_context,
889 i386_thread_added): Use dr_status_mirror and dr_control_mirror
890 from debug_reg_state.
891
a59306a3
YQ
8922011-11-05 Yao Qi <yao@codesourcery.com>
893
894 * tracepoint.c (gdb_collect): Loop over tracepoints of same
895 address as TPOINT's.
896
3065dfb6
SS
8972011-11-02 Stan Shebs <stan@codesourcery.com>
898
899 * tracepoint.c (agent_mem_read_string): New function.
900 (eval_agent_expr): Call it for tracenz.
901 * server.c (handle_query): Report support for tracenz.
902
fd0d8c7c
YQ
9032011-11-02 Yao Qi <yao@codesourcery.com>
904
905 * tracepoint.c (cmd_qtstart): Remove unused local variables.
906
609086b1
YQ
9072011-11-02 Yao Qi <yao@codesourcery.com>
908
909 * target.h: Fix a typo in comment.
910
b9fd1791
PA
9112011-10-31 Pedro Alves <pedro@codesourcery.com>
912
913 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
914 clobber the breakpoints' shadows with fast tracepoint jumps.
915 * mem-break.h (check_mem_write): Add `myaddr' parameter.
916 * target.c (write_inferior_memory): Also pass MYADDR down to
917 check_mem_write.
918
03583c20
UW
9192011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
920
921 * configure.ac: Check support for personality routine.
922 * configure: Regenerate.
923 * config.in: Likewise.
924 * linux-low.c: Include <sys/personality.h>.
925 Define ADDR_NO_RANDOMIZE if necessary.
926 (linux_create_inferior): Disable address space randomization when
927 forking inferior, if requested.
928 (linux_supports_disable_randomization): New function.
929 (linux_target_ops): Install it.
930 * server.h (disable_randomization): Declare.
931 * server.c (disable_randomization): New global variable.
932 (handle_general_set): Handle QDisableRandomization.
933 (handle_query): Likewise for qSupported.
934 (main): Support --disable-randomization and --no-disable-randomization
935 command line arguments.
936 * target.h (struct target_ops): Add supports_disable_randomization.
937 (target_supports_disable_randomization): New macro.
938
723b724b
MF
9392011-09-29 Mike Frysinger <vapier@gentoo.org>
940
941 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
942 ifdef check.
943 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
944 [!PT_GETDSBT] (target_loadmap): New definition.
945 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
946 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
947 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
948 and PT_GETDSBT to LINUX_LOADMAP.
949 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
950 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
951
55329a5c 9522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
953
954 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
955 (arm_linux_hwbp_cap): New static variable.
956 (arm_linux_get_hwbp_cap): Replace by ...
957 (arm_linux_init_hwbp_cap): ... this new function.
958 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
959 (arm_linux_get_hw_watchpoint_count): Likewise.
960 (arm_linux_get_hw_watchpoint_max_length): Likewise.
961 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
962 (arm_prepare_to_resume): Use perror_with_name instead of error.
963
55329a5c 9642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
965
966 * linux-arm-low.c: Include <signal.h>.
967 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
968 (struct arm_linux_hwbp_cap): New data type.
969 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
970 (struct arm_linux_hw_breakpoint): New data type.
971 (MAX_BPTS, MAX_WPTS): Define.
972 (struct arch_process_info, struct arch_lwp_info): New data types.
973 (arm_linux_get_hwbp_cap): New function.
974 (arm_linux_get_hw_breakpoint_count): Likewise.
975 (arm_linux_get_hw_watchpoint_count): Likewise.
976 (arm_linux_get_hw_watchpoint_max_length): Likewise.
977 (arm_hwbp_control_initialize): Likewise.
978 (arm_hwbp_control_is_enabled): Likewise.
979 (arm_hwbp_control_is_initialized): Likewise.
980 (arm_hwbp_control_disable): Likewise.
981 (arm_linux_hw_breakpoint_equal): Likewise.
982 (arm_linux_hw_point_initialize): Likewise.
983 (struct update_registers_data): New data structure.
984 (update_registers_callback: New function.
985 (arm_insert_point): Likewise.
986 (arm_remove_point): Likewise.
987 (arm_stopped_by_watchpoint): Likewise.
988 (arm_stopped_data_address): Likewise.
989 (arm_new_process): Likewise.
990 (arm_new_thread): Likewise.
991 (arm_prepare_to_resume): Likewise.
992 (the_low_target): Register arm_insert_point, arm_remove_point,
993 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
994 arm_new_thread, and arm_prepare_to_resume.
995
6b9801d4
SS
9962011-09-15 Stan Shebs <stan@codesourcery.com>
997
998 * server.h (struct emit_ops): Add compare-goto fields.
999 * tracepoint.c (gdb_agent_op_sizes): New table.
1000 (emit_eq_goto): New function.
1001 (emit_ne_goto): New function.
1002 (emit_lt_goto): New function.
1003 (emit_le_goto): New function.
1004 (emit_gt_goto): New function.
1005 (emit_ge_goto): New function.
1006 (is_goto_target): New function.
1007 (compile_bytecodes): Recognize special cases of compare-goto
1008 combinations and call specialized emitters for them.
1009 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1010 (amd64_emit_ne_goto): New function.
1011 (amd64_emit_lt_goto): New function.
1012 (amd64_emit_le_goto): New function.
1013 (amd64_emit_gt_goto): New function.
1014 (amd64_emit_ge_goto): New function.
1015 (amd64_emit_ops): Add the new functions.
1016 (i386_emit_eq_goto): New function.
1017 (i386_emit_ne_goto): New function.
1018 (i386_emit_lt_goto): New function.
1019 (i386_emit_le_goto): New function.
1020 (i386_emit_gt_goto): New function.
1021 (i386_emit_ge_goto): New function.
1022 (i386_emit_ops): Add the new functions.
1023
bf15cbda
SS
10242011-09-08 Stan Shebs <stan@codesourcery.com>
1025
1026 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1027 (i386_emit_epilogue): Restore %ebx.
1028
943ca1dd
JZ
10292011-08-31 Jie Zhang <jzhang918@gmail.com>
1030
1031 * server.c (step_thread): Remove definition.
1032 (process_serial_event): Don't handle Hs.
1033 * server.h (step_thread): Remove declaration.
1034 * target.c (set_desired_inferior): Remove use of step_thread.
1035
e3deef73
LM
10362011-08-24 Luis Machado <lgustavo@codesourcery.com>
1037
1038 * linux-low.c: Include linux-procfs.h.
1039 (linux_attach_lwp_1): Update comments.
1040 (linux_attach): Scan for existing threads when attaching to a
1041 process that is the tgid.
1042 * Makefile.in: Update dependencies.
1043
13da1c97
LM
10442011-08-24 Luis Machado <lgustavo@codesourcery.com>
1045
1046 * configure.srv: Add linux-procfs.o dependencies.
1047
881127c9
YQ
10482011-08-14 Yao Qi <yao@codesourcery.com>
1049
1050 * target.h (struct target_ops): Fix indent.
1051 * win32-low.c (win32_target_ops): Fix comment.
1052
58dbd541
YQ
10532011-08-14 Andrew Jenner <andrew@codesourcery.com>
1054 Yao Qi <yao@codesourcery.com>
1055
1056 * Makefile.in (clean): Remove tic6x-*.c files.
1057 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1058 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1059 (tic6x-c64xp-linux.c): Likewise.
1060 * configure.srv: Add support for tic6x-*-uclinux.
1061 * linux-tic6x-low.c: New.
1062 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1063
78d85199
YQ
10642011-08-14 Andrew Stubbs <ams@codesourcery.com>
1065 Yao Qi <yao@codesourcery.com>
1066
1067 * target.h (struct target_ops): Add read_loadmap.
1068 * linux-low.c (struct target_loadseg): New type.
1069 (struct target_loadmap): New type.
1070 (linux_read_loadmap): New function.
1071 (linux_target_ops): Add linux_read_loadmap.
1072 * server.c (handle_query): Support qXfer:fdpic:read packet.
1073 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1074
a959a88d
EZ
10752011-08-05 Eli Zaretskii <eliz@gnu.org>
1076
1077 * win32-low.c: Include <stdint.h>.
1078
1ced966e
PA
10792011-07-22 Pedro Alves <pedro@codesourcery.com>
1080
1081 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1082 to the inferior here.
1083 (i386_remove_aligned_watchpoint): Ditto.
1084 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1085 fit part of the watchpoint in the debug registers.
1086 (i386_update_inferior_debug_regs): New.
1087 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1088 registers, and only update the inferior on success.
1089 (i386_low_remove_watchpoint): Ditto.
1090
d26e3629
KY
10912011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1092
1093 * linux-low.c (compare_ints, unique, list_threads, show_process,
1094 linux_core_of_thread): Delete.
1095 (linux_target_ops): Change linux_core_of_thread to
1096 linux_common_core_of_thread.
1097 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1098 * utils.c (malloc_failure): Change type of argument.
1099 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1100 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1101 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1102 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1103 (IPA_OBJS): Add common-utils-ipa.o.
1104 (ptid_h, linux_osdata_h): New macros.
1105 (server_h): Add common/common-utils.h, common/xml-utils.h,
1106 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1107 common/ptid.h.
1108 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1109 ptid.o, buffer.o): New rules.
1110 (linux-low.o): Add common/linux-osdata.h as a dependency.
1111 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1112 * configure.ac: Add AC_HEADER_DIRENT check.
1113 * config.in: Regenerate.
1114 * configure: Regenerate.
1115 * remote-utils.c (xml_escape_text): Delete.
1116 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1117 buffer_xml_printf): Move to common/buffer.c.
1118 * server.c (main): Remove call to initialize_inferiors.
1119 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1120 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1121 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1122 internal_error, gdb_assert, gdb_assert_fail): Delete.
1123 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1124 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1125 common/buffer.h.
1126 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1127 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1128 initialize_inferiors): Delete.
1129
2275a1a7
PA
11302011-07-20 Pedro Alves <pedro@codesourcery.com>
1131
1132 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1133 symbol error.
1134
0a5b1e09
PA
11352011-05-31 Pedro Alves <pedro@codesourcery.com>
1136
1137 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1138 assertion.
1139 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1140
6938fd34
YQ
11412011-05-26 Yao Qi <yao@codesourcery.com>
1142
1143 * Makefile.in (thread-db.o): Track dependence to
1144 common/gdb_thread_db.h.
1145 * thread-db.c: include gdb_thread_db.h from right place.
1146
b481f9e0
TT
11472011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1148
1149 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1150 __FILE__ and __LINE__ to internal_error.
1151
98a5dd13
DE
11522011-05-13 Doug Evans <dje@google.com>
1153
1154 * thread-db.c (try_thread_db_load_from_sdir): New function.
1155 (try_thread_db_load_from_dir): New function.
1156 (thread_db_load_search): Handle $sdir, ignore $pdir.
1157 Remove trying of system directories if search of
1158 libthread-db-search-path fails, that is now done via $sdir.
1159
d248b706
KY
11602011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1161
1162 * server.c (handle_query): Add EnableDisableTracepoints to the list
1163 of supported features.
1164 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1165 tracepoints.
1166 (cmd_qtenable_disable): New.
1167 (cmd_qtstart): Install tracepoints even if disabled.
1168 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1169 receiving a QTEnable or QTDisable packet.
1170 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1171 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1172 tracepoints.
1173 (gdb_probe): Skip data collection if static tracepoint is disabled.
1174
84e578fb
DE
11752011-05-10 Doug Evans <dje@google.com>
1176
1177 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1178
71f55dd8
DE
11792011-05-04 Doug Evans <dje@google.com>
1180
1181 * linux-low.c (linux_join): Skip process lookup.
1182 * spu-low.c (spu_join): Ditto.
1183 * server.c (join_inferiors_callback): Delete.
1184 (process_serial_event): For 'D' packet (detach) call join_inferior
1185 directly.
1186
4d393d60
JM
11872011-05-04 Joseph Myers <joseph@codesourcery.com>
1188
1189 * README: Don't mention xscale*-*-linux*.
1190 * configure.srv (xscale*-*-linux*): Don't handle target.
1191
b00ad6ff
NF
11922011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1193
1194 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1195 casting pointers.
1196 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1197 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1198 (i386_emit_void_call_2): Likewise.
1199
af96c192
YQ
12002011-04-26 Yao Qi <yao@codesourcery.com>
1201
1202 * linux-low.c: Move common macros to linux-ptrace.h.
1203 Include linux-ptrace.h.
1204 * Makefile.in (linux_ptrace_h): New.
1205 (linux-low.o): Depends on linux-ptrace.h.
1206
03f2bd59
JK
12072011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1208
1209 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1210 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1211 (remote_prepare): New function with most of the TCP code from ...
1212 (remote_open): ... here. Detect PORT here unconditionally. Move also
1213 setting transport_is_reliable.
1214 * server.c (run_once): New variable.
1215 (gdbserver_usage): Document it.
1216 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1217 the first run if RUN_ONCE.
1218 * server.h (run_once, remote_prepare): New declarations.
1219
7a9dd1b2
TT
12202011-04-19 Tom Tromey <tromey@redhat.com>
1221
1222 * win32-low.c (handle_load_dll): Remove duplicate "the".
1223
81239425
PM
12242011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1225
1226 Remove support for old Cygwin 1.5 versions.
1227 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1228 function to avoid warning.
1229 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1230 warning.
1231
9e0627f1
PM
12322011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1233
1234 * gdbserver/server.h (Macro _): Define it if not available.
1235
588eebee
MS
12362011-03-14 Michael Snyder <msnyder@vmware.com>
1237
348af9f7 1238 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 1239
43f70d4c
JB
12402011-03-10 Joel Brobecker <brobecker@adacore.com>
1241
1242 * Makefile.in (maintainer-clean realclean distclean): Remove
1243 "make ... subdir_do" command.
1244
348af9f7
MS
12452011-03-10 Michael Snyder <msnyder@vmware.com>
1246
1247 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1248
1249 * server.c (handle_v_run): Free alloced buffer on early return.
1250
e637a4f5
YQ
12512011-03-09 Yao Qi <yao@codesourcery.com>
1252
1253 Revert:
1254 2011-03-04 Yao Qi <yao@codesourcery.com>
1255
1256 * Makefile.in: Remove GNU make feature --directory.
1257
1258 2011-03-05 Yao Qi <yao@codesourcery.com>
1259
1260 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1261 (subdir_do): New make target. Copied from gdb/Makefile.
1262 (maintainer-clean, realclean, distclean, clean): Call corresponding
1263 make targets in common/Makefile.
1264
1265 2011-02-11 Yao Qi <yao@codesourcery.com>
1266
1267 * configure.ac: Call AC_PROG_RANLIB.
1268 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1269 * configure: Regenerate.
1270
e6edda56
JK
12712011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1272
1273 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1274
e5141119
JB
12752011-03-06 Yao Qi <yao@codesourcery.com>
1276
1277 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1278
64794aa4
JB
12792011-03-05 Yao Qi <yao@codesourcery.com>
1280
1281 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1282 (subdir_do): New make target. Copied from gdb/Makefile.
1283 (maintainer-clean, realclean, distclean, clean): Call corresponding
1284 make targets in common/Makefile.
1285
7a762829
YQ
12862011-03-04 Yao Qi <yao@codesourcery.com>
1287
1288 * Makefile.in: Remove GNU make feature --directory.
1289
348af9f7
MS
12902011-03-04 Michael Snyder <msnyder@vmware.com>
1291
1292 * server.c (queue_stop_reply): Call xmalloc not malloc.
1293
12942011-03-02 Michael Snyder <msnyder@vmware.com>
1295
1296 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1297
9f72fee2
MS
12982011-02-28 Michael Snyder <msnyder@vmware.com>
1299
588eebee
MS
1300 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1301 (cmd_qtframe): Ditto.
1302 (cmd_qtbuffer): Ditto.
1303 (cmd_bigqtbuffer): Ditto.
1304
9f72fee2
MS
1305 * utils.c (decimal2str): Initialize 'width' to nine, then
1306 don't mess with it.
1307
8040bd49
UW
13082011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1309
1310 * hostio.c (require_data): Free *data, not data.
1311
7e52cbd0
JK
13122011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1313
1314 * hostio.c (require_data): Use free, not xfree.
1315
9130f83e
MS
13162011-02-27 Michael Snyder <msnyder@vmware.com>
1317
4b812f4e
MS
1318 * server.c (handle_query): Discard unused value.
1319
9130f83e
MS
1320 * hostio.c (require_data): Free malloc memory before returning
1321 error.
1322
69d37113
MS
13232011-02-26 Michael Snyder <msnyder@vmware.com>
1324
1325 * linux-low.c (list_threads): Call closedir for dirent.
1326
35f5825a
MS
13272011-02-27 Michael Snyder <msnyder@vmware.com>
1328
2a589cef
MS
1329 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1330 a case statement falls through.
1331
0adea5f7
MS
1332 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1333
35f5825a
MS
1334 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1335 in comparison.
1336
238f1c74
MS
13372011-02-26 Michael Snyder <msnyder@vmware.com>
1338
1339 * utils.c (decimal2str): Eliminate dead code and dead param.
1340 (pulongest): Drop dead param from call to decimal2str.
1341 (plongest): Ditto.
1342
633ff500
JB
13432011-02-24 Joel Brobecker <brobecker@adacore.com>
1344
1345 Revert the following patch (not approved yet):
1346 2011-02-21 Hui Zhu <teawater@gmail.com>
1347 * tracepoint.c (tp_printf): New function.
1348 (eval_agent_expr): Handle gdb_agent_op_printf.
1349
f9c6ff72
HZ
13502011-02-21 Hui Zhu <teawater@gmail.com>
1351
1352 * tracepoint.c (tp_printf): New function.
1353 (eval_agent_expr): Handle gdb_agent_op_printf.
1354
94d5e490
TT
13552011-02-18 Tom Tromey <tromey@redhat.com>
1356
1357 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1358 (tracepoint.o): Likewise.
1359 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1360 (gdb_agent_op_names): Likewise.
1361
c7f96d2b
TT
13622011-02-18 Tom Tromey <tromey@redhat.com>
1363
1364 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1365 gdb_agent_op_rot>: New constants.
1366 (gdb_agent_op_names): Add pick and roll.
1367 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1368 cases.
1369
0feedb2c
JK
13702011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1371
1372 * aclocal.m4: Regenerated with aclocal-1.11.1.
1373
b3b9301e
PA
13742011-02-14 Pedro Alves <pedro@codesourcery.com>
1375
1376 * server.c (handle_qxfer_traceframe_info): New.
1377 (qxfer_packets): Register "traceframe-info".
1378 (handle_query): Report support for qXfer:traceframe-info:read+.
1379 * tracepoint.c (match_blocktype): New.
1380 (traceframe_find_block_type): Rename to ...
1381 (traceframe_walk_blocks): ... this. Add callback filter argument,
1382 and use it.
1383 (traceframe_find_block_type): New, reimplemented on top of
1384 traceframe_walk_blocks.
1385 (build_traceframe_info_xml): New.
1386 (traceframe_read_info): New.
1387 * server.h (traceframe_read_info): Declare.
1388
4f3e6fb7
YQ
13892011-02-11 Yao Qi <yao@codesourcery.com>
1390
1391 * configure.ac: Call AC_PROG_RANLIB.
1392 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1393 * configure: Regenerate.
1394
764880b7
PA
13952011-02-07 Pedro Alves <pedro@codesourcery.com>
1396
1397 * server.c (gdb_read_memory): Change return semantics to allow
1398 partial transfers.
1399 (handle_search_memory_1): Adjust.
1400 (process_serial_event) <'m' packet>: Handle partial transfers.
1401 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1402
1c79eb8a
PA
14032011-01-28 Pedro Alves <pedro@codesourcery.com>
1404
1405 * regcache.c (init_register_cache): Initialize
1406 regcache->register_status.
1407 (free_register_cache): Release regcache->register_status.
1408 (regcache_cpy): Copy register_status.
1409 (registers_to_string): Print 'x's for unavailable registers.
1410 (supply_register): Mark the register's status valid or
1411 unavailable, depending on whether a buffer was passed in or not.
1412 (supply_register_zeroed): New.
1413 (supply_regblock): Mark the registers' status valid or
1414 unavailable, depending on whether a buffer was passed in or not.
1415 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1416 (struct regcache): New `register_status' field.
1417 (supply_register_zeroed): Declare.
1418 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1419 supply_register_zeroed, rather than passing a NULL buffer to
1420 supply_register.
1421 * tracepoint.c (fetch_traceframe_registers): Update comment.
1422
85724a0e
PA
14232011-01-28 Pedro Alves <pedro@codesourcery.com>
1424
1425 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1426 buffer explicit.
1427
d08aafef
PA
14282011-01-25 Pedro Alves <pedro@codesourcery.com>
1429
1430 * server.h (decode_xfer_write): Change prototype.
1431 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1432 and don't extract the annex here.
1433 * server.c (decode_xfer_read): Remove `annex' parameter,
1434 and don't extract the annex here.
1435 (decode_xfer): New.
1436 (struct qxfer): New.
1437 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1438 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1439 (handle_qxfer_statictrace): New functions, abstracted out from
1440 handle_query, and made to use the struct qxfer interface.
1441 (handle_threads_qxfer_proper): Rename to ...
1442 (handle_qxfer_threads_proper): ... this.
1443 (handle_threads_qxfer): Rename to ...
1444 (handle_qxfer_threads): ... this. Adjust.
1445 (qxfer_packets): New array.
1446 (handle_qxfer): New function.
1447 (handle_query): Use handle_qxfer.
1448
493e2a69
MS
14492011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1450
1451 * gdbreplay.c: Shorten lines of >= 80 columns.
1452 * linux-low.c: Ditto.
1453 * linux-ppc-low.c: Ditto.
1454 * linux-s390-low.c: Ditto.
1455 * linux-sparc-low.c: Ditto.
1456 * linux-x86-low.c: Ditto.
1457 * linux-xtensa-low.c: Ditto.
1458 * mem-break.c: Ditto.
1459 * nto-low.c: Ditto.
1460 * regcache.h: Ditto.
1461 * remote-utils.c: Ditto.
1462 * server.c: Ditto.
1463 * server.h: Ditto.
1464 * thread-db.c: Ditto.
1465 * tracepoint.c: Ditto.
1466 * utils.c: Ditto.
1467 * win32-low.h: Ditto.
1468
44944448
JB
14692011-01-05 Joel Brobecker <brobecker@adacore.com>
1470
1471 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1472 update.
1473
71ce852c
JB
14742011-01-01 Joel Brobecker <brobecker@adacore.com>
1475
1476 * server.c (gdbserver_version): Update copyright year in version
1477 output.
1478 * gdbreplay.c (gdbreplay_version): Ditto.
1479
eb826dc6
MF
14802010-12-29 Jie Zhang <jie.zhang@analog.com>
1481
1482 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1483 * linux-bfin-low.c: New file.
1484 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1485 PT_DATA_ADDR for BFIN targets.
1486 * Makefile.in (SFILES): Add linux-bfin-low.c.
1487 (clean): Remove reg-bfin.c.
1488 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1489 * README: Mention supported Blackfin targets.
1490
39ab222a
MF
14912010-12-23 Mike Frysinger <vapier@gentoo.org>
1492
1493 * .gitignore: New file.
1494
a1f2ce7d
MF
14952010-11-16 Mike Frysinger <vapier@gentoo.org>
1496
1497 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1498
f474844c
JZ
14992010-10-22 Jie Zhang <jie@codesourcery.com>
1500
1501 * Makefile.in: Add FLAGS_TO_PASS variable.
1502 (install): Remove dependency of install-only and recursively
1503 invoke make for install-only.
1504
f1048712
DE
15052010-10-04 Doug Evans <dje@google.com>
1506
1507 * Makefile.in (uninstall): Use $(DESTDIR).
1508
b53a1623
PA
15092010-09-24 Pedro Alves <pedro@codesourcery.com>
1510
e6ee044d
PA
1511 PR gdb/11842
1512
b53a1623
PA
1513 * linux-x86-low.c (compat_siginfo_from_siginfo)
1514 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1515 si_code is < 0. Check for si_code == SI_TIMER before checking for
1516 si_code < 0.
1517
fa1bd1e4
JB
15182010-09-13 Joel Brobecker <brobecker@adacore.com>
1519
1520 * lynx-i386-low.c: New file.
1521 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1522
47fac8f8
JB
15232010-09-13 Joel Brobecker <brobecker@adacore.com>
1524
1525 * lynx-low.c (ptrace_request_to_str): Remove handling for
1526 request values that have been removed in LynxOS 5.x.
1527
1adfc54d
JB
15282010-09-13 Joel Brobecker <brobecker@adacore.com>
1529
1530 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1531 <ptrace.h>
1532
c2a66c29
NS
15332010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1534
1535 * configure.ac: Add --enable-inprocess-agent option.
1536 * configure: Rebuilt.
1537
32fcada3
YQ
15382010-09-06 Yao Qi <yao@codesourcery.com>
1539
1540 * linux-low.c (linux_kill): Remove unused variable.
1541 (linux_stabilize_threads): Likewise.
1542 * server.c (start_inferior): Likewise.
1543 (queue_stop_reply_callback): Likewise.
1544 * tracepoint.c (do_action_at_tracepoint): Likewise.
1545
0cccb683
YQ
15462010-09-06 Yao Qi <yao@codesourcery.com>
1547
1548 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1549 on return.
1550
423ec54c
JK
15512010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1552
1553 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1554
12ac6819
PA
15552010-09-06 Pedro Alves <pedro@codesourcery.com>
1556
1557 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1558 "$(IPA_DEPFILES)".
1559
8ed54b31
JB
15602010-09-01 Joel Brobecker <brobecker@adacore.com>
1561
1562 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1563 gdbserver/lynx-ppc-low.c: New files.
1564 * Makefile.in (lynx_low_h): New variable.
1565 (lynx-low.o, lynx-ppc-low.o): New rules.
1566 * configure.ac: On LynxOS, link with -lnetinet.
1567 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1568 * configure: regenerate.
1569
bb0116a4
JB
15702010-09-01 Joel Brobecker <brobecker@adacore.com>
1571
1572 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1573 * configure.ac: Add check for vasprintf and vsnprintf.
1574 * configure, config.in: Regenerate.
1575 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1576
a778ab81 15772010-09-01 Joel Brobecker <brobecker@adacore.com>
1578
1579 * gdbreplay.c: Move include of alloca.h up, next to include of
1580 malloc.h.
1581 * server.h: Add include of malloc.h.
1582 * mem-break.c: Remove include of malloc.h.
1583 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1584
8b034a19 15852010-09-01 Joel Brobecker <brobecker@adacore.com>
1586
1587 * Makefile.in (memmem.o): Build with -Wno-error.
1588
15892010-09-01 Joel Brobecker <brobecker@adacore.com>
1590
1591 * utils.c (xsnprintf): Make non-static.
1592 * server.h: Add xsnprintf declaration.
1593 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1594 replace calls to snprintf by calls to xsnprintf throughout.
1595
15962010-09-01 Joel Brobecker <brobecker@adacore.com>
1597
1598 * configure.ac: Add configure check for alloca.
1599 * configure, config.in: Regenerate.
1600 * server.h: Include alloca.h if it exists.
1601 * gdbreplay.c: Include alloca.h if it exists.
1602
1a981360
PA
16032010-08-28 Pedro Alves <pedro@codesourcery.com>
1604
1605 * linux-low.c (__SIGRTMIN): Define if not already defined.
1606 (linux_create_inferior): Check for __ANDROID__ rather than
1607 __SIGRTMIN.
1608 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1609 are already deferred.
1610 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1611 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1612 stopped and already has a pending signal to report.
1613 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1614 a pending signal to report or is moving out of a jump pad.
1615 (linux_init_signals): Check for __ANDROID__ rather than
1616 __SIGRTMIN.
1617
b4d51a55
PA
16182010-08-28 Pedro Alves <pedro@codesourcery.com>
1619
1620 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1621 debug_threads check. Avoid a linear search when not doing debug
1622 output.
1623
ec48365d
PA
16242010-08-27 Pedro Alves <pedro@codesourcery.com>
1625
1626 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1627 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1628 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1629 (process_event): Change local fd's type to gdb_fildes_t.
1630 (create_file_handler): Adjust prototype.
1631 (delete_file_handler): Adjust prototype.
1632 (handle_file_event): Adjust prototype. Use pfildes.
1633 (create_file_event): Adjsut prototype.
1634 * remote-utils.c (remote_desc, listen_desc): Change type to
1635 gdb_fildes_t.
1636 * server.h: New gdb_fildes_t typedef.
1637 [USE_WIN32API]: Include winsock2.h.
1638 (delete_file_handler, add_file_handler): Adjust prototypes.
1639 (pfildes): Declare.
1640 * utils.c (pfildes): New.
1641
854d88f0
PA
16422010-08-27 Pedro Alves <pedro@codesourcery.com>
1643
1644 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1645 * configure: Regenerate.
1646
0146f85b
PA
16472010-08-27 Pedro Alves <pedro@codesourcery.com>
1648
1649 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1650 (linux_done_accessing_memory): ... this.
1651 (linux_target_ops): Adjust.
1652 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1653 * nto-low.c (nto_target_ops): Adjust comment.
1654 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1655 * spu-low.c (spu_target_ops): Adjust comment.
1656 * target.h (target_ops): Rename unprepare_to_access_memory field
1657 to done_accessing_memory.
1658 (unprepare_to_access_memory): Rename to ...
1659 (done_accessing_memory): ... this.
1660
90d74c30
PA
16612010-08-26 Pedro Alves <pedro@codesourcery.com>
1662
1663 * linux-low.c (linux_prepare_to_access_memory): New.
1664 (linux_unprepare_to_access_memory): New.
1665 (linux_target_ops): Install them.
1666 * server.c (read_memory): Rename to ...
1667 (gdb_read_memory): ... this. Use
1668 prepare_to_access_memory/prepare_to_access_memory.
1669 (write_memory): Rename to ...
1670 (gdb_write_memory): ... this. Use
1671 prepare_to_access_memory/prepare_to_access_memory.
1672 (handle_search_memory_1): Adjust.
1673 (process_serial_event): Adjust.
1674 * target.h (struct target_ops): New fields
1675 prepare_to_access_memory and unprepare_to_access_memory.
1676 (prepare_to_access_memory, unprepare_to_access_memory): New.
1677 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1678 prepare_to_access_memory/prepare_to_access_memory.
1679 * nto-low.c (nto_target_ops): Adjust.
1680 * spu-low.c (spu_target_ops): Adjust.
1681 * win32-low.c (win32_target_ops): Adjust.
1682
fd467969
PA
16832010-08-26 Pedro Alves <pedro@codesourcery.com>
1684
1685 * Makefile.in (WARN_CFLAGS): Get it from configure.
1686 (WERROR_CFLAGS): New.
1687 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1688 * configure.ac: Introduce --enable-werror, which adds -Werror to
1689 the compiler command line. Enabled by default. Disable with
1690 --disable-werror. Add -Wdeclaration-after-statement
1691 Wpointer-arith and -Wformat-nonliteral to warning flags.
1692 * configure: Regenerate.
1693
331e2f5f
PA
16942010-08-26 Pedro Alves <pedro@codesourcery.com>
1695
1696 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1697
e581f2b4
PA
16982010-08-26 Pedro Alves <pedro@codesourcery.com>
1699
1700 * gdbreplay.c (remote_error): New.
1701 (gdbchar): New.
1702 (expect): Use gdbchar. Check for error reading from GDB.
1703 Clarify sync error output.
1704 (play): Check for errors writing to GDB.
1705 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1706 * remote-utils.c (getpkt): Check for errors writing to the remote
1707 descriptor.
1708
3c11dd79
PA
17092010-08-25 Pedro Alves <pedro@codesourcery.com>
1710
1711 * linux-low.c (linux_wait_1): Move non-debugging code out of
1712 `debug_threads' control.
1713
d20a8ad9
PA
17142010-08-25 Pedro Alves <pedro@codesourcery.com>
1715
1716 * linux-low.c (linux_wait_1): Don't set last_status here.
1717 * server.c (push_event, queue_stop_reply_callback): Assert we're
1718 not pushing a TARGET_WAITKIND_IGNORE event.
1719 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1720 (myresume, handle_target_event): Set the thread's last_resume_kind
1721 and last_status from the target returned status.
1722
964e4306
PA
17232010-08-25 Pedro Alves <pedro@codesourcery.com>
1724
1725 PR threads/10729
1726
1727 * linux-x86-low.c (update_debug_registers_callback): New.
1728 (i386_dr_low_set_addr): Use it.
1729 (i386_dr_low_get_addr): New.
1730 (i386_dr_low_set_control): Use update_debug_registers_callback.
1731 (i386_dr_low_get_control): New.
1732 (i386_dr_low_get_status): Adjust.
1733 * linux-low.c (linux_stop_lwp): New.
1734 * linux-low.h (linux_stop_lwp): Declare.
1735
1736 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1737 argument instead of a i386_debug_reg_state.
1738 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1739 a i386_debug_reg_state.
1740 (i386_insert_aligned_watchpoint): Adjust.
1741 (i386_remove_aligned_watchpoint): Adjust.
1742 (i386_low_stopped_data_address): Read the debug registers from the
1743 inferior instead of from the mirrors.
1744 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1745 (i386_dr_low_get_addr): Declare.
1746 (i386_dr_low_get_control): Declare.
1747 (i386_dr_low_get_status): Change prototype.
1748
1749 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1750 (i386_dr_low_get_addr): New.
1751 (i386_dr_low_get_control): New.
1752 (i386_dr_low_get_status): Adjust prototype. Return
1753 dr_status_mirror.
1754 (i386_initial_stuff): Clear dr_status_mirror and
1755 dr_control_mirror.
1756 (i386_get_thread_context): Adjust.
1757 (i386_set_thread_context): Adjust.
1758 (i386_thread_added): Adjust.
1759
5f21a75b
PA
17602010-08-24 Pedro Alves <pedro@codesourcery.com>
1761
1762 * linux-low.h (linux_thread_area): Delete declaration.
1763
3e4c1235
TS
17642010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1765
1766 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1767 after its termination.
1768
1971b033
PA
17692010-08-09 Pedro Alves <pedro@codesourcery.com>
1770
1771 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1772 (gdb_wants_all_stopped): Delete.
1773 (linux_wait_1): Don't call them.
1774 * server.c (handle_v_cont): Tag all threads as want-stopped.
1775 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1776 stopped as "client-wants-stopped".
1777
310444ac
PA
17782010-07-31 Pedro Alves <pedro@codesourcery.com>
1779
1780 * Makefile.in (signals_h): New.
1781 (server_h): Depend on it.
1782 (server.o): Don't depend on $(signals_def).
1783 (signals.o): Depend on $(signals_def).
1784
a19cae16
JK
17852010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1786
1787 * Makefile.in (signals_def): New.
1788 (server_h): Append include/gdb/signals.h and signals_def.
1789 (server.o): Append signals_def.
1790
30d50328
JK
17912010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1792
1793 * server.c (handle_target_event): Use target_signal_to_host for
1794 resume_info.sig initialization.
1795 * target.h (struct thread_resume) <sig>: New comment.
1796
5c3216e2
OS
17972010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1798
c6f46ca0
OS
1799 * server.c (handle_query): strcpy() the returned string from paddress()
1800 instead of sprintf().
5c3216e2
OS
1801 * utils.c (paddress): Return phex_nz().
1802
6bd31874
JB
18032010-07-07 Joel Brobecker <brobecker@adacore.com>
1804
1805 * server.c (handle_v_cont): Call mourn_inferior if process
1806 just exited.
1807 (myresume): Likewise.
1808
0fb4aa4b
PA
18092010-07-01 Pedro Alves <pedro@codesourcery.com>
1810
1811 Static tracepoints, and integration with UST.
1812
1813 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1814 * mem-break.c (uninsert_all_breakpoints)
1815 (reinsert_all_breakpoints): New.
1816 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1817 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1818 (gdb_agent_ust_loaded, helper_thread_id)
1819 (gdb_agent_helper_thread_id): New macros.
1820 (struct ipa_sym_addresses): Add addr_ust_loaded,
1821 addr_helper_thread_id, addr_cmd_buf.
1822 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1823 (in_process_agent_loaded_ust): New.
1824 (write_e_ust_not_loaded): New.
1825 (maybe_write_ipa_ust_not_loaded): New.
1826 (struct collect_static_trace_data_action): New.
1827 (enum tracepoint_type) <static_tracepoint>: New.
1828 (struct tracepoint) <handle>: Mention static tracepoints.
1829 (struct static_tracepoint_ctx): New.
1830 (CMD_BUF_SIZE): New.
1831 (add_tracepoint_action): Handle static tracepoint actions.
1832 (unprobe_marker_at): New.
1833 (clear_installed_tracepoints): Handle static tracepoints.
1834 (cmd_qtdp): Handle static tracepoints.
1835 (probe_marker_at): New.
1836 (cmd_qtstart): Handle static tracepoints.
1837 (response_tracepoint): Handle static tracepoints.
1838 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1839 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1840 (get_context_regcache): Handle static tracepoints.
1841 (do_action_at_tracepoint): Handle static tracepoint actions.
1842 (traceframe_find_block_type): Handle static trace data blocks.
1843 (traceframe_read_sdata): New.
1844 (download_tracepoints): Download static tracepoint actions.
1845 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1846 (GDB_PROBE_NAME): New.
1847 (ust_ops): New.
1848 (GET_UST_SYM): New.
1849 (USTF): New.
1850 (dlsym_ust): New.
1851 (ust_marker_to_static_tracepoint): New.
1852 (gdb_probe): New.
1853 (collect_ust_data_at_tracepoint): New.
1854 (gdb_ust_probe): New.
1855 (UNIX_PATH_MAX, SOCK_DIR): New.
1856 (gdb_ust_connect_sync_socket): New.
1857 (resume_thread, stop_thread): New.
1858 (run_inferior_command): New.
1859 (init_named_socket): New.
1860 (gdb_ust_socket_init): New.
1861 (cstr_to_hexstr): New.
1862 (next_st): New.
1863 (first_marker, next_marker): New.
1864 (response_ust_marker): New.
1865 (cmd_qtfstm, cmd_qtsstm): New.
1866 (unprobe_marker_at, probe_marker_at): New.
1867 (cmd_qtstmat, gdb_ust_thread): New.
1868 (gdb_ust_init): New.
1869 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1870 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1871 (ST_REGENTRY): New.
1872 (x86_64_st_collect_regmap): New.
1873 (X86_64_NUM_ST_COLLECT_GREGS): New.
1874 (AMD64_RIP_REGNUM): New.
1875 (supply_static_tracepoint_registers): New.
1876 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1877 (ST_REGENTRY): New.
1878 (i386_st_collect_regmap): New.
1879 (i386_NUM_ST_COLLECT_GREGS): New.
1880 (supply_static_tracepoint_registers): New.
1881 * server.c (handle_query): Handle qXfer:statictrace:read.
1882 <qSupported>: Report support for StaticTracepoints, and
1883 qXfer:statictrace:read features.
1884 * server.h (traceframe_read_sdata)
1885 (supply_static_tracepoint_registers): Declare.
1886 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1887 (unpack_varlen_hex): Include in IPA build.
1888 * Makefile.in (ustlibs, ustinc): New.
1889 (IPA_OBJS): Add remote-utils-ipa.o.
1890 ($(IPA_LIB)): Link -ldl and -lpthread.
1891 (UST_CFLAGS): New.
1892 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1893 * config.in, configure: Regenerate.
1894
9e4344e5
PA
18952010-06-20 Ian Lance Taylor <iant@google.com>
1896 Pedro Alves <pedro@codesourcery.com>
1897
1898 * linux-x86-low.c (always_true): Delete.
1899 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1900 trying to fool the compiler with always_true.
1901
c6beb2cb
PA
19022010-06-20 Pedro Alves <pedro@codesourcery.com>
1903
1904 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1905 conditions in gdbserver.
1906
d2ed6730
UW
19072010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1908
1909 * spu-low.c (spu_read_memory): Wrap around local store limit.
1910 (spu_write_memory): Likewise.
1911
4e29fb54
PA
19122010-06-15 Pedro Alves <pedro@codesourcery.com>
1913
1914 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1915 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1916 LONGEST uses.
1917 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1918 uses.
1919 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1920 uses with LONGEST uses.
1921
6a271cae
PA
19222010-06-14 Stan Shebs <stan@codesourcery.com>
1923 Pedro Alves <pedro@codesourcery.com>
1924
1925 Bytecode compiler.
1926
1927 * linux-x86-low.c: Include limits.h.
1928 (add_insns): New.
1929 (always_true): New.
1930 (EMIT_ASM): New.
1931 (EMIT_ASM32): New.
1932 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1933 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1934 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1935 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1936 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1937 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1938 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1939 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1940 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1941 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1942 (amd64_emit_void_call_2): New.
1943 (amd64_emit_ops): New.
1944 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1945 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1946 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1947 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1948 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1949 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1950 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1951 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1952 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1953 (i386_emit_stack_adjust, i386_emit_int_call_1)
1954 (i386_emit_void_call_2): New.
1955 (i386_emit_ops): New.
1956 (x86_emit_ops): New.
1957 (the_low_target): Install x86_emit_ops.
1958 * server.h (struct emit_ops): New.
1959 (get_raw_reg_func_addr): Declare.
1960 (current_insn_ptr, emit_error): Declare.
1961 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1962 (set_trace_state_variable_value): New defines.
1963 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1964 addr_get_trace_state_variable_value and
1965 addr_set_trace_state_variable_value.
1966 (symbol_list): New fields for get_raw_reg,
1967 get_trace_state_variable_value and set_trace_state_variable_value.
1968 (condfn): New typedef.
1969 (struct tracepoint): New field `compiled_cond'.
1970 (do_action_at_tracepoint): Clear compiled_cond.
1971 (get_trace_state_variable_value, set_trace_state_variable_value):
1972 Export in the IPA.
1973 (condition_true_at_tracepoint): If there's a compiled condition,
1974 run that.
1975 (current_insn_ptr, emit_error): New globals.
1976 (struct bytecode_address): New.
1977 (get_raw_reg_func_addr): New.
1978 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1979 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1980 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1981 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1982 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1983 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1984 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1985 (compile_tracepoint_condition, compile_bytecodes): New.
1986 * target.h (emit_ops): Forward declare.
1987 (struct target_ops): New field emit_ops.
1988 (target_emit_ops): New.
1989 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1990 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1991 * linux-low.c (linux_emit_ops): New.
1992 (linux_target_ops): Install it.
1993 * linux-low.h (struct linux_target_ops): New field emit_ops.
1994
92b72907
UW
19952010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1996
1997 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1998 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1999
fa593d66
PA
20002010-06-01 Pedro Alves <pedro@codesourcery.com>
2001 Stan Shebs <stan@codesourcery.com>
2002
2003 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2004 (all): Depend on $(extra_libraries).
2005 (install-only): Install the IPA.
2006 (IPA_OBJS, IPA_LIB): New.
2007 (clean): Remove the IPA lib.
2008 (IPAGENT_CFLAGS): New.
2009 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2010 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2011 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2012 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2013 * configure.ac: Check for atomic builtins support in the compiler.
2014 (IPA_DEPFILES, extra_libraries): Define.
2015 * configure.srv (ipa_obj): Add description.
2016 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2017 (i[34567]86-*-linux*): Set ipa_obj.
2018 (x86_64-*-linux*): Set ipa_obj.
2019 * linux-low.c (stabilizing_threads): New.
2020 (supports_fast_tracepoints): New.
2021 (linux_detach): Stabilize threads before detaching.
2022 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2023 the lwp is either not stabilizing, or is moving out of a jump pad.
2024 (linux_fast_tracepoint_collecting): New.
2025 (maybe_move_out_of_jump_pad): New.
2026 (enqueue_one_deferred_signal): New.
2027 (dequeue_one_deferred_signal): New.
2028 (linux_wait_for_event_1): If moving out of a jump pad, defer
2029 pending signals to later.
2030 (linux_stabilize_threads): New.
2031 (linux_wait_1): Check if threads need moving out of jump pads, and
2032 do it if so.
2033 (stuck_in_jump_pad_callback): New.
2034 (move_out_of_jump_pad_callback): New.
2035 (lwp_running): New.
2036 (linux_resume_one_lwp): Handle moving out of jump pads.
2037 (linux_set_resume_request): Dequeue deferred signals.
2038 (need_step_over_p): Also step over fast tracepoint jumps.
2039 (start_step_over): Also uninsert fast tracepoint jumps.
2040 (finish_step_over): Also reinsert fast tracepoint jumps.
2041 (linux_install_fast_tracepoint_jump): New.
2042 (linux_target_ops): Install linux_stabilize_threads and
2043 linux_install_fast_tracepoint_jump_pad.
2044 * linux-low.h (linux_target_ops) <get_thread_area,
2045 install_fast_tracepoint_jump_pad>: New fields.
2046 (struct lwp_info) <collecting_fast_tracepoint,
2047 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2048 (linux_get_thread_area): Declare.
2049 * linux-x86-low.c (jump_insn): New.
2050 (x86_get_thread_area): New.
2051 (append_insns): New.
2052 (push_opcode): New.
2053 (amd64_install_fast_tracepoint_jump_pad): New.
2054 (i386_install_fast_tracepoint_jump_pad): New.
2055 (x86_install_fast_tracepoint_jump_pad): New.
2056 (the_low_target): Install x86_get_thread_area and
2057 x86_install_fast_tracepoint_jump_pad.
2058 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2059 (struct fast_tracepoint_jump): New.
2060 (fast_tracepoint_jump_insn): New.
2061 (fast_tracepoint_jump_shadow): New.
2062 (find_fast_tracepoint_jump_at): New.
2063 (fast_tracepoint_jump_here): New.
2064 (delete_fast_tracepoint_jump): New.
2065 (set_fast_tracepoint_jump): New.
2066 (uninsert_fast_tracepoint_jumps_at): New.
2067 (reinsert_fast_tracepoint_jumps_at): New.
2068 (set_breakpoint_at): Use write_inferior_memory.
2069 (uninsert_raw_breakpoint): Use write_inferior_memory.
2070 (check_mem_read): Mask out fast tracepoint jumps.
2071 (check_mem_write): Mask out fast tracepoint jumps.
2072 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2073 (set_fast_tracepoint_jump): Declare.
2074 (delete_fast_tracepoint_jump)
2075 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2076 (reinsert_fast_tracepoint_jumps_at): Declare.
2077 * regcache.c: Don't compile many functions when building the
2078 in-process agent library.
2079 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2080 the register buffer in the heap.
2081 (free_register_cache): If the register buffer isn't owned by the
2082 regcache, don't free it.
2083 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2084 pre-existing register caches.
2085 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2086 type.
2087 (convert_ascii_to_int): : Constify `from' parameter type.
2088 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2089 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2090 the needed buffer in-place.
2091 (relocate_instruction): New.
2092 * server.c (handle_query) <qSymbols>: If the target supports
2093 tracepoints, give it a chance of looking up symbols. Report
2094 support for fast tracepoints.
2095 (handle_status): Stabilize threads.
2096 (process_serial_event): Adjust.
2097 * server.h (struct fast_tracepoint_jump): Forward declare.
2098 (struct process_info) <fast_tracepoint_jumps>: New field.
2099 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2100 (decode_X_packet, decode_M_packet): Adjust.
2101 (relocate_instruction): Declare.
2102 (in_process_agent_loaded): Declare.
2103 (tracepoint_look_up_symbols): Declare.
2104 (struct fast_tpoint_collect_status): Declare.
2105 (fast_tracepoint_collecting): Declare.
2106 (force_unlock_trace_buffer): Declare.
2107 (handle_tracepoint_bkpts): Declare.
2108 (initialize_low_tracepoint)
2109 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2110 * target.h (struct target_ops) <stabilize_threads,
2111 install_fast_tracepoint_jump_pad>: New fields.
2112 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2113 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2114 [HAVE_STDINT_H]: Include stdint.h.
2115 (trace_debug_1): Rename to ...
2116 (trace_vdebug): ... this.
2117 (trace_debug): Rename to ...
2118 (trace_debug_1): ... this. Add `level' parameter.
2119 (trace_debug): New.
2120 (ATTR_USED, ATTR_NOINLINE): New.
2121 (IP_AGENT_EXPORT): New.
2122 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2123 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2124 (about_to_request_buffer_space, trace_buffer_is_full)
2125 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2126 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2127 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2128 (traceframe_write_count, traceframes_created)
2129 (trace_state_variables)
2130 New renaming defines.
2131 (struct ipa_sym_addresses): New.
2132 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2133 (symbol_list): New.
2134 (ipa_sym_addrs): New.
2135 (all_tracepoint_symbols_looked_up): New.
2136 (in_process_agent_loaded): New.
2137 (write_e_ipa_not_loaded): New.
2138 (maybe_write_ipa_not_loaded): New.
2139 (tracepoint_look_up_symbols): New.
2140 (debug_threads) [IN_PROCESS_AGENT]: New.
2141 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2142 (UNKNOWN_SIDE_EFFECTS): New.
2143 (stop_tracing): New.
2144 (flush_trace_buffer): New.
2145 (stop_tracing_bkpt): New.
2146 (flush_trace_buffer_bkpt): New.
2147 (read_inferior_integer): New.
2148 (read_inferior_uinteger): New.
2149 (read_inferior_data_pointer): New.
2150 (write_inferior_data_pointer): New.
2151 (write_inferior_integer): New.
2152 (write_inferior_uinteger): New.
2153 (struct collect_static_trace_data_action): Delete.
2154 (enum tracepoint_type): New.
2155 (struct tracepoint) <type>: New field `type'.
2156 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2157 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2158 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2159 (tracepoints): Use IP_AGENT_EXPORT.
2160 (last_tracepoint): Don't include in the IPA.
2161 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2162 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2163 (alloced_trace_state_variables): New.
2164 (trace_state_variables): Use IP_AGENT_EXPORT.
2165 (traceframe_t): Delete unused variable.
2166 (circular_trace_buffer): Don't include in the IPA.
2167 (trace_buffer_start): Delete.
2168 (struct trace_buffer_control): New.
2169 (trace_buffer_free): Delete.
2170 (struct ipa_trace_buffer_control): New.
2171 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2172 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2173 New.
2174 (trace_buffer_ctrl): New.
2175 (TRACE_BUFFER_CTRL_CURR): New.
2176 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2177 Reimplement as macros.
2178 (trace_buffer_wrap): Delete.
2179 (traceframe_write_count, traceframe_read_count)
2180 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2181 (struct tracepoint_hit_ctx) <type>: New field.
2182 (struct fast_tracepoint_ctx): New.
2183 (memory_barrier): New.
2184 (cmpxchg): New.
2185 (record_tracepoint_error): Update atomically in the IPA.
2186 (clear_inferior_trace_buffer): New.
2187 (about_to_request_buffer_space): New.
2188 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2189 updating the same buffer.
2190 (add_tracepoint): Default the tracepoint's type to trap
2191 tracepoint, and orig_size to -1.
2192 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2193 internal variables.
2194 (create_trace_state_variable): New parameter `gdb'. Handle it.
2195 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2196 (cmd_qtdp): Handle fast tracepoints.
2197 (cmd_qtdv): Adjust.
2198 (max_jump_pad_size): New.
2199 (gdb_jump_pad_head): New.
2200 (get_jump_space_head): New.
2201 (claim_jump_space): New.
2202 (sort_tracepoints): New.
2203 (MAX_JUMP_SIZE): New.
2204 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2205 IPA.
2206 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2207 support. Upload fast traceframes, and delete internal IPA
2208 breakpoints.
2209 (stop_tracing_handler): New.
2210 (flush_trace_buffer_handler): New.
2211 (cmd_qtstop): Upload fast tracepoints.
2212 (response_tracepoint): Handle fast tracepoints.
2213 (tracepoint_finished_step): Upload fast traceframes. Set the
2214 tracepoint hit context's tracepoint type.
2215 (handle_tracepoint_bkpts): New.
2216 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2217 type. Add comment about fast tracepoints.
2218 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2219 non-existing action_str field.
2220 (get_context_regcache): Handle fast tracepoints.
2221 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2222 to the regcache.
2223 (fast_tracepoint_from_jump_pad_address): New.
2224 (fast_tracepoint_from_ipa_tpoint_address): New.
2225 (collecting_t): New.
2226 (force_unlock_trace_buffer): New.
2227 (fast_tracepoint_collecting): New.
2228 (collecting): New.
2229 (gdb_collect): New.
2230 (write_inferior_data_ptr): New.
2231 (target_tp_heap): New.
2232 (target_malloc): New.
2233 (download_agent_expr): New.
2234 (UALIGN): New.
2235 (download_tracepoints): New.
2236 (download_trace_state_variables): New.
2237 (upload_fast_traceframes): New.
2238 (IPA_FIRST_TRACEFRAME): New.
2239 (IPA_NEXT_TRACEFRAME_1): New.
2240 (IPA_NEXT_TRACEFRAME): New.
2241 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2242 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2243 (gdb_jump_pad_buffer_end): New.
2244 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2245 (initialize_tracepoint): Adjust.
2246 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2247 buffer. Initialize the low module.
2248 * utils.c (PREFIX, TOOLNAME): New.
2249 (malloc_failure): Use PREFIX.
2250 (error): In the IPA, an error causes an exit.
2251 (fatal, warning): Use PREFIX.
2252 (internal_error): Use TOOLNAME.
2253 (NUMCELLS): Increase to 10.
2254 * configure, config.in: Regenerate.
2255
d149dd1d
PA
22562010-06-01 Pedro Alves <pedro@codesourcery.com>
2257
2258 * server.c (handle_query) <qSupported>: Do two passes over the
2259 qSupported string to avoid nesting strtok.
2260
f6528abd
JK
22612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2262
2263 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2264 (CDEPS): New.
2265 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2266 -Wl,--dynamic-list.
2267 * configure: Regenerate.
2268 * proc-service.list: New.
2269
ca2a87a0
JK
22702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2271
2272 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2273 New comment.
2274
363a6e9f
OS
22752010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2276
2277 * gdbreplay.c (remote_open): Check error return from socket() call by
2278 its equality to -1 not by it being negative.
2279 * remote-utils.c (remote_open): Likewise.
2280
d23b6cb1
PA
22812010-05-23 Pedro Alves <pedro@codesourcery.com>
2282
2283 * config.h: Regenerate.
2284
28d3cf85
MK
22852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2286
2287 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2288 doesn't provide PTRACE_GET_THREAD_AREA.
2289
fea36a59
MK
22902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2291
2292 * linux-m68k-low.c: Include <asm/ptrace.h>
2293 (ps_get_thread_area): Implement.
2294
24b066ba
DE
22952010-05-03 Doug Evans <dje@google.com>
2296
2297 * event-loop.c (struct callback_event): New struct.
2298 (callback_list): New global.
2299 (append_callback_event, delete_callback_event): New functions.
2300 (process_callback): New function.
2301 (start_event_loop): Call it.
2302 * remote-utils.c (NOT_SCHEDULED): Define.
2303 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2304 moved out of readchar.
2305 (readchar): Rewrite. Call reschedule before returning.
2306 (reset_readchar): New function.
2307 (remote_close): Call it.
2308 (process_remaining, reschedule): New functions.
2309 * server.h (callback_handler_func): New typedef.
2310 (append_callback_event, delete_callback_event): Declare.
2311
9836d6ea
PA
23122010-05-03 Pedro Alves <pedro@codesourcery.com>
2313
2314 * proc-service.c (ps_pglobal_lookup): Use
2315 thread_db_look_up_one_symbol.
2316 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2317 parameter. Use it instead of all_symbols_looked_up.
2318 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2319 field.
2320 (all_symbols_looked_up): Don't declare.
2321 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2322 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2323 field.
2324 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2325 Set all_symbols_looked_up here.
2326 (thread_db_look_up_one_symbol): New.
2327 (thread_db_get_tls_address): Adjust.
2328 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2329 thread_db object on the heap, and tentatively set it in the
2330 process structure.
2331 (thread_db_init): Don't set all_symbols_looked_up here.
2332 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2333
7984d532
PA
23342010-05-03 Pedro Alves <pedro@codesourcery.com>
2335
2336 * linux-low.c (linux_kill, linux_detach): Adjust.
2337 (status_pending_p_callback): Remove redundant statement. Check
2338 for !TARGET_WAITIKIND_IGNORE, instead of
2339 TARGET_WAITKIND_STOPPED.
2340 (handle_tracepoints): Make sure LWP is locked. Adjust.
2341 (linux_wait_for_event_1): Adjust.
2342 (linux_cancel_breakpoints): New.
2343 (unsuspend_one_lwp): New.
2344 (unsuspend_all_lwps): New.
2345 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2346 (send_sigstop_callback): Change return type to int, add new
2347 `except' parameter and handle it.
2348 (suspend_and_send_sigstop_callback): New.
2349 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2350 pass them down. If SUSPEND, also increment the lwp's suspend
2351 count.
2352 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2353 (need_step_over_p): Don't consider suspended LWPs.
2354 (start_step_over): Adjust.
2355 (proceed_one_lwp): Change return type to int, add new `except'
2356 parameter and handle it.
2357 (unsuspend_and_proceed_one_lwp): New.
2358 (proceed_all_lwps): Use find_inferior instead of
2359 for_each_inferior.
2360 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2361 also decrement the suspend count of LWPs. Pass `except' down,
2362 instead of hacking its suspend count.
2363 (linux_pause_all): Add `freeze' parameter. Adjust.
2364 (linux_unpause_all): New.
2365 (linux_target_ops): Install linux_unpause_all.
2366 * server.c (handle_status): Adjust.
2367 * target.h (struct target_ops): New fields `unpause_all' and
2368 `cancel_breakpoints'. Add new parameter to `pause_all'.
2369 (pause_all): Add new `freeze' parameter.
2370 (unpause_all): New.
2371 (cancel_breakpoints): New.
2372 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2373 cancel breakpoints.
2374 (cmd_qtstart): Pause threads.
2375 (stop_tracing): Pause threads, and cancel breakpoints.
2376 * win32-low.c (win32_target_ops): Adjust.
2377
e471f25b
PA
23782010-05-03 Pedro Alves <pedro@codesourcery.com>
2379
2380 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2381 the inferior right away from here...
2382 (linux_wait_1): ... to here, and adjust to check the thread's
2383 last_resume_kind instead of the lwp's step or stop_expected flags.
2384
1915ef4f
PA
23852010-05-02 Pedro Alves <pedro@codesourcery.com>
2386
2387 * README: Use consistent `GDB' and `GDBserver' spellings.
2388
f9e39928
PA
23892010-05-02 Pedro Alves <pedro@codesourcery.com>
2390
2391 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2392 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2393 (linux_detach_one_lwp): Assume the lwp is stopped.
2394 (any_thread_of): Delete.
2395 (linux_detach): Stop all lwps here. Don't blindly delete all
2396 breakpoints.
2397 (delete_lwp_callback): New.
2398 (linux_mourn): Delete all lwps of the process that is gone.
2399 (linux_wait_1): Don't delete the last lwp of the process here.
2400 * mem-break.h (mark_breakpoints_out): Declare.
2401 * mem-break.c (mark_breakpoints_out): New.
2402 (free_all_breakpoints): Use it.
2403 * server.c (handle_target_event): If the process is gone, mark
2404 breakpoints out.
2405 * thread-db.c (struct thread_db) <create_bp>: New field.
2406 (thread_db_enable_reporting): Fix prototype. Store a thread event
2407 breakpoint reference in the thread_db struct.
2408 (thread_db_load_search): Clear the thread_db object.
2409 (try_thread_db_load_1): Ditto.
2410 (switch_to_process): New.
2411 (disable_thread_event_reporting): Use it.
2412 (remove_thread_event_breakpoints): New.
2413 (thread_db_detach, thread_db_mourn): Use it.
2414
1e7fc18c
PA
24152010-05-01 Pedro Alves <pedro@codesourcery.com>
2416
2417 * linux-low.c (linux_enable_event_reporting): New.
2418 (linux_wait_for_event_1, handle_extended_wait): Use it.
2419
02fc4de7
PA
24202010-04-30 Pedro Alves <pedro@codesourcery.com>
2421
2422 * linux-low.c (linux_kill_one_lwp, linux_kill)
2423 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2424 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2425 SIGSTOP even if the LWP is stopped.
2426 (send_sigstop_callback): New.
2427 (stop_all_lwps): Use send_sigstop_callback instead.
2428 (linux_resume_one_thread): Adjust.
2429 (proceed_one_lwp): Still proceed an LWP that the client has
2430 requested to stop, if we haven't reported it as stopped yet. Make
2431 sure that LWPs the client want stopped, have a pending SIGSTOP.
2432
bc3b5632
DE
24332010-04-26 Doug Evans <dje@google.com>
2434
ae1ada35
DE
2435 * server.c (handle_general_set): Make static.
2436
bc3b5632
DE
2437 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2438 Print received char after testing for error/eof instead of before.
2439 (input_interrupt): Tweak comment.
2440
65730243
DE
24412010-04-23 Doug Evans <dje@google.com>
2442
2443 * server.c (start_inferior): Print inferior argv if --debug.
2444
a8ae7dc0
AR
24452010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2446
2447 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2448 * nto-x86-low.c: Include server.h
2449
1c07cc19
PM
24502010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2451
2452 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2453 be consistent with other sources of this directory.
2454 (init_registers_amd64): Correct name of source file of this function
2455 in the comment.
2456
e0a61e09
PM
24572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2458
2459 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2460 64-bit executables.
2461
54709339
PM
24622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2463
2464 * win32-i386-low.c: Add 64-bit support.
2465 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2466 (init_registers_amd64): Declare.
2467 (mappings): Add 64-bit version of array.
2468 (init_windows_x86): New function.
2469 (the_low_target): Change init_arch field to init_windows_x86.
2470
e8f0053d
PM
24712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2472
2473 * win32-low.c: Adapt to support also 64-bit architecture.
2474 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2475 (get_image_name): Use SIZE_T type for local variable `done'.
2476 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2477 (toolhelp_get_dll_name): Idem.
2478 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2479 Use uintptr_t typecast to avoid warning.
2480 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2481 (handle_exception): Use phex_nz to avoid warning.
2482 (win32_wait): Remove unused local variable `process'.
2483
c481e77e
PM
24842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2485
2486 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2487 `amd64-avx.o'.
2488
12ea4b69
PM
24892010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2490
2491 * configure.ac: Use `ws2_32' library for srv_mingw.
2492 * configure: Regenerate.
2493 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2494 * remote-utils.c: Likewise.
2495
f6d1620c
L
24962010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2497
2498 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2499 if __x86_64__ is defined.
2500
8e642873
PM
25012010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2502
2503 * configure: Regenerate.
2504
711e434b
PM
25052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2506
2507 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2508 * target.h (target_ops): New get_tib_address field.
2509 * win32-low.h (win32_thread_info): Add thread_local_base field.
2510 * win32-low.c (child_add_thread): Add tlb argument.
2511 Set thread_local_base field to TLB.
2512 (get_child_debug_event): Adapt to child_add_thread change.
2513 (win32_get_tib_address): New function.
2514 (win32_target_ops): Set get_tib_address field to
2515 win32_get_tib_address.
2516 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2517
505106cd
PA
25182010-04-12 Pedro Alves <pedro@codesourcery.com>
2519
505106cd
PA
2520 * linux-low.c (linux_mourn): Also remove the process.
2521 * server.c (handle_target_event): Don't remove the process here.
2522 * nto-low.c (nto_mourn): New.
2523 (nto_target_ops): Install it.
2524 * spu-low.c (spu_mourn): New.
2525 (spu_target_ops): Install it.
2526 * win32-low.c (win32_mourn): New.
2527 (win32_target_ops): Install it.
2528
e8470a06
PA
25292010-04-12 Pedro Alves <pedro@codesourcery.com>
2530
2531 * server.h (buffer_xml_printf): Remove redundant `;'.
2532
45ba0d02
PA
25332010-04-12 Pedro Alves <pedro@codesourcery.com>
2534
2535 * regcache.c (set_register_cache): Invalidate regcaches before
2536 changing the register cache layout.
2537 (regcache_invalidate_one): Allow a NULL regcache.
2538 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2539 regcaches before changing the register cache layout or the target
2540 regsets.
2541
59e04013
L
25422010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2543
2544 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2545 variable warning on Linux/x86-64.
2546
8336d594
PA
25472010-04-11 Pedro Alves <pedro@codesourcery.com>
2548
2549 GDBserver disconnected tracing support.
2550
2551 * linux-low.c (linux_remove_process): Delete.
2552 (add_lwp): Don't set last_resume_kind here.
2553 (linux_kill): Use `mourn'.
2554 (linux_detach): Use `thread_db_detach', and `mourn'.
2555 (linux_mourn): New.
2556 (linux_attach_lwp_1): Adjust comment.
2557 (linux_attach): last_resume_kind moved the thread_info; adjust.
2558 (status_pending_p_callback): Adjust.
2559 (linux_wait_for_event_1): Adjust.
2560 (count_events_callback, select_singlestep_lwp_callback)
2561 (select_event_lwp_callback, cancel_breakpoints_callback)
2562 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2563 (proceed_one_lwp): Adjust.
2564 (linux_async): Add debug output.
2565 (linux_thread_stopped): New.
2566 (linux_pause_all): New.
2567 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2568 linux_pause_all.
2569 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2570 (thread_db_free): Delete declaration.
2571 (thread_db_detach, thread_db_mourn): Declare.
2572 * thread-db.c (thread_db_init): Use thread_db_mourn.
2573 (thread_db_free): Delete, split in two.
2574 (disable_thread_event_reporting): New.
2575 (thread_db_detach): New.
2576 (thread_db_mourn): New.
2577
2578 * server.h (struct thread_info) <last_resume_kind>: New field.
2579 <attached>: Add comment.
2580 <gdb_detached>: New field.
2581 (handler_func): Change return type to int.
2582 (handle_serial_event, handle_target_event): Ditto.
2583 (gdb_connected): Declare.
2584 (tracing): Delete.
2585 (disconnected_tracing): Declare.
2586 (stop_tracing): Declare.
2587
2588 * server.c (handle_query) <qSupported>: Report support for
2589 disconnected tracing.
2590 (queue_stop_reply_callback): Account for running threads.
2591 (gdb_wants_thread_stopped): New.
2592 (gdb_wants_all_threads_stopped): New.
2593 (gdb_reattached_process): New.
2594 (handle_status): Clear the `gdb_detached' flag of all processes.
2595 In all-stop, stop all threads.
2596 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2597 (process_serial_event): If the remote connection breaks, or if an
2598 exit was forced with "monitor exit", force an event loop exit.
2599 Handle disconnected tracing on detach.
2600 (handle_serial_event): Adjust.
2601 (handle_target_event): If GDB isn't connected, forward events back
2602 to the inferior, unless the last process exited, in which case,
2603 exit gdbserver. Adjust interface.
2604
2605 * remote-utils.c (remote_open): Don't block in accept. Instead
2606 register an event loop source on the listen socket file
2607 descriptor. Refactor bits into ...
2608 (listen_desc): ... this new global.
2609 (gdb_connected): ... this new function.
2610 (enable_async_notification): ... this new function.
2611 (handle_accept_event): ... this new function.
2612 (remote_close): Clear remote_desc.
2613
2614 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2615
2616 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2617 New fields.
2618 (mourn_inferior): Define.
2619 (target_process_qsupported): Avoid the dangling else problem.
2620 (thread_stopped): Define.
2621 (pause_all): Define.
2622 (target_waitstatus_to_string): Declare.
2623 * target.c (target_waitstatus_to_string): New.
2624
2625 * tracepoint.c (tracing): Make extern.
2626 (disconnected_tracing): New.
2627 (stop_tracing): Make extern. Handle tracing stops due to GDB
2628 disconnecting.
2629 (cmd_qtdisconnected): New.
2630 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2631 (handle_tracepoint_general_set): Handle QTDisconnected.
2632
2633 * event-loop.c (event_handler_func): Change return type to int.
2634 (process_event): Bail out if the event handler wants the event
2635 loop to stop.
2636 (handle_file_event): Ditto.
2637 (start_event_loop): Bail out if the event handler wants the event
2638 loop to stop.
2639
2640 * nto-low.c (nto_target_ops): Adjust.
2641 * spu-low.c (spu_wait): Don't remove the process here.
2642 (spu_target_ops): Adjust.
2643 * win32-low.c (win32_wait): Don't remove the process here.
2644 (win32_target_ops): Adjust.
2645
5d267c4c
PA
26462010-04-11 Pedro Alves <pedro@codesourcery.com>
2647
2648 * regcache.c (realloc_register_cache): Invalidate inferior's
2649 regcache before recreating it.
2650
623ccd72
PA
26512010-04-09 Pedro Alves <pedro@codesourcery.com>
2652
2653 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2654
219f2f23
PA
26552010-04-09 Stan Shebs <stan@codesourcery.com>
2656 Pedro Alves <pedro@codesourcery.com>
2657
2658 * server.h (LONGEST): New.
2659 (struct thread_info) <while_stepping>: New field.
2660 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2661 Declare.
2662 (initialize_tracepoint, handle_tracepoint_general_set)
2663 (handle_tracepoint_query, tracepoint_finished_step)
2664 (tracepoint_was_hit, release_while_stepping_state_list):
2665 (current_traceframe): Declare.
2666 * server.c (handle_general_set): Handle tracepoint packets.
2667 (read_memory): New.
2668 (write_memory): New.
2669 (handle_search_memory_1): Use read_memory.
2670 (handle_query): Report support for conditional tracepoints, trace
2671 state variables, and tracepoint sources. Handle tracepoint
2672 queries.
2673 (main): Initialize the tracepoints module.
2674 (process_serial_event): Handle traceframe reads/writes.
2675
2676 * linux-low.c (handle_tracepoints): New.
2677 (linux_wait_1): Call it.
2678 (linux_resume_one_lwp): Handle while-stepping.
2679 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2680 (linux_target_ops): Install them.
2681 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2682 New field.
2683 * linux-x86-low.c (x86_supports_tracepoints): New.
2684 (the_low_target). Install it.
2685
2686 * mem-break.h (delete_breakpoint): Declare.
2687 * mem-break.c (delete_breakpoint): Make external.
2688
2689 * target.h (struct target_ops): Add `supports_tracepoints',
2690 `read_pc', and `write_pc' fields.
2691 (target_supports_tracepoints): Define.
2692 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2693 (phex_nz): New.
2694
2695 * regcache.h (struct regcache) <registers_owned>: New field.
2696 (init_register_cache, regcache_cpy): Declare.
2697 (regcache_read_pc, regcache_write_pc): Declare.
2698 (register_cache_size): Declare.
2699 (supply_regblock): Declare.
2700 * regcache.c (init_register_cache): New.
2701 (new_register_cache): Use it.
2702 (regcache_cpy): New.
2703 (register_cache_size): New.
2704 (supply_regblock): New.
2705 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 2706
219f2f23
PA
2707 * tracepoint.c: New.
2708
2709 * Makefile.in (OBS): Add tracepoint.o.
2710 (tracepoint.o): New rule.
2711
3a13a53b
L
27122010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2713
2714 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2715 (i386-mmx.o): New.
2716 (i386-mmx.c): Likewise.
2717 (i386-mmx-linux.o): Likewise.
2718 (i386-mmx-linux.c): Likewise.
2719
2720 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2721 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2722 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2723 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2724
2725 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2726 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2727 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2728
1570b33e
L
27292010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2730
2731 * Makefile.in (clean): Updated.
2732 (i386-avx.o): New.
2733 (i386-avx.c): Likewise.
2734 (i386-avx-linux.o): Likewise.
2735 (i386-avx-linux.c): Likewise.
2736 (amd64-avx.o): Likewise.
2737 (amd64-avx.c): Likewise.
2738 (amd64-avx-linux.o): Likewise.
2739 (amd64-avx-linux.c): Likewise.
2740
2741 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2742 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2743 (srv_amd64_regobj): Add amd64-avx.o.
2744 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2745 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2746 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2747 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2748 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2749 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2750 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2751
2752 * i387-fp.c: Include "i386-xstate.h".
2753 (i387_xsave): New.
2754 (i387_cache_to_xsave): Likewise.
2755 (i387_xsave_to_cache): Likewise.
2756 (x86_xcr0): Likewise.
2757
2758 * i387-fp.h (i387_cache_to_xsave): Likewise.
2759 (i387_xsave_to_cache): Likewise.
2760 (x86_xcr0): Likewise.
2761
2762 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2763 * linux-crisv32-low.c (target_regsets): Likewise.
2764 * linux-m68k-low.c (target_regsets): Likewise.
2765 * linux-mips-low.c (target_regsets): Likewise.
2766 * linux-ppc-low.c (target_regsets): Likewise.
2767 * linux-s390-low.c (target_regsets): Likewise.
2768 * linux-sh-low.c (target_regsets): Likewise.
2769 * linux-sparc-low.c (target_regsets): Likewise.
2770 * linux-xtensa-low.c (target_regsets): Likewise.
2771
2772 * linux-low.c: Include <sys/uio.h>.
2773 (regsets_fetch_inferior_registers): Support nt_type.
2774 (regsets_store_inferior_registers): Likewise.
2775 (linux_process_qsupported): New.
2776 (linux_target_ops): Add linux_process_qsupported.
2777
2778 * linux-low.h (regset_info): Add nt_type.
2779 (linux_target_ops): Add process_qsupported.
2780
2781 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2782 and <sys/uio.h>.
2783 (init_registers_i386_avx_linux): New.
2784 (init_registers_amd64_avx_linux): Likewise.
2785 (xmltarget_i386_linux_no_xml): Likewise.
2786 (xmltarget_amd64_linux_no_xml): Likewise.
2787 (PTRACE_GETREGSET): Likewise.
2788 (PTRACE_SETREGSET): Likewise.
2789 (x86_fill_xstateregset): Likewise.
2790 (x86_store_xstateregset): Likewise.
2791 (use_xml): Likewise.
2792 (x86_linux_update_xmltarget): Likewise.
2793 (x86_linux_process_qsupported): Likewise.
2794 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2795 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2796 init_registers_i386_linux here. Call
2797 x86_linux_update_xmltarget.
2798 (the_low_target): Add x86_linux_process_qsupported.
2799
2800 * server.c (handle_query): Call target_process_qsupported.
2801
2802 * target.h (target_ops): Add process_qsupported.
2803 (target_process_qsupported): New.
2804
fc7238bb
PA
28052010-04-03 Pedro Alves <pedro@codesourcery.com>
2806
2807 * inferiors.c (add_thread): Set last_status kind to
2808 TARGET_WAITKIND_IGNORE.
2809 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2810 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2811 (linux_wait_1): Move `thread' local definition to block that uses
2812 it. Don't NULL initialize `event_child'.
2813 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2814 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2815 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2816
bdabb078
PA
28172010-04-01 Pedro Alves <pedro@codesourcery.com>
2818
2819 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2820 an extended waitstatus, or by a watchpoint.
2821 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2822 thread was stepping or has been stopped by a watchpoint.
2823
d3bbe7a0
PA
28242010-04-01 Pedro Alves <pedro@codesourcery.com>
2825
2826 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2827 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2828 of another, then delete the previous, and validate all
2829 breakpoints.
2830 (validate_inserted_breakpoint): New.
2831 (delete_disabled_breakpoints): New.
2832 (validate_breakpoints): New.
2833 (check_mem_read): Validate breakpoints before trusting their
2834 shadow. Delete disabled breakpoints.
2835 (check_mem_write): Validate breakpoints before trusting they
2836 should be inserted. Delete disabled breakpoints.
2837 * mem-break.h (validate_breakpoints):
2838 * server.c (handle_query): Validate breakpoints when we see a
2839 qSymbol query.
2840
8b07ae33
PA
28412010-04-01 Pedro Alves <pedro@codesourcery.com>
2842
2843 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2844 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2845 if we could tell there's a GDB breakpoint at stop_pc.
2846 (need_step_over_p): Don't do a step over if we find a GDB
2847 breakpoint at the resume PC.
2848
2849 * mem-break.c (struct raw_breakpoint): New.
2850 (enum bkpt_type): New type `gdb_breakpoint'.
2851 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2852 fields. New field `raw'.
2853 (find_raw_breakpoint_at): New.
2854 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2855 breakpoint instead.
2856 (set_breakpoint_at): Adjust.
2857 (delete_raw_breakpoint): New.
2858 (release_breakpoint): New.
2859 (delete_breakpoint): Rename to...
2860 (delete_breakpoint_1): ... this. Add proc parameter. Use
2861 release_breakpoint. Return ENOENT.
2862 (delete_breakpoint): Reimplement.
2863 (find_breakpoint_at): Delete.
2864 (find_gdb_breakpoint_at): New.
2865 (delete_breakpoint_at): Delete.
2866 (set_gdb_breakpoint_at): New.
2867 (delete_gdb_breakpoint_at): New.
2868 (gdb_breakpoint_here): New.
2869 (set_reinsert_breakpoint): Use release_breakpoint.
2870 (uninsert_breakpoint): Rename to ...
2871 (uninsert_raw_breakpoint): ... this.
2872 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2873 (reinsert_raw_breakpoint): Change parameter type to
2874 raw_breakpoint.
2875 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2876 instead.
2877 (check_breakpoints): Adjust. Use release_breakpoint.
2878 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2879 (breakpoint_inserted_here): Ditto.
2880 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2881 Don't trust the breakpoint's shadow if it is not inserted.
2882 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2883 (delete_all_breakpoints): Adjust.
2884 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2885 use delete_breakpoint_1.
2886
2887 * mem-break.h (breakpoints_supported): Delete declaration.
2888 (set_gdb_breakpoint_at): Declare.
2889 (gdb_breakpoint_here): Declare.
2890 (delete_breakpoint_at): Delete.
2891 (delete_gdb_breakpoint_at): Declare.
2892
2893 * server.h (struct raw_breakpoint): Forward declare.
2894 (struct process_info): New field `raw_breakpoints'.
2895
2896 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2897 breakpoints.
2898
6bf5e0ba
PA
28992010-03-24 Pedro Alves <pedro@codesourcery.com>
2900
2901 * linux-low.c (status_pending_p_callback): Fix comment.
2902 (linux_wait_for_event_1): Move most of the internal breakpoint
2903 handling from here...
2904 (linux_wait_1): ... to here.
2905 (count_events_callback): New.
2906 (select_singlestep_lwp_callback): New.
2907 (select_event_lwp_callback): New.
2908 (cancel_breakpoints_callback): New.
2909 (select_event_lwp): New.
2910 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2911 priority to all LWPs that have had events that should be reported
2912 to the client. Cancel breakpoints when about to reporting the
2913 event to the client, not while stopping lwps. No longer cancel
2914 finished single-steps here.
2915 (cancel_finished_single_step): Delete.
2916 (cancel_finished_single_steps): Delete.
2917
414a389f
PA
29182010-03-24 Pedro Alves <pedro@codesourcery.com>
2919
2920 * mem-break.c (enum bkpt_type): New.
2921 (struct breakpoint): New field `type'.
2922 (set_breakpoint_at): Change return type to struct breakpoint
2923 pointer. Set type to `other_breakpoint' by default.
2924 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2925 in the breakpoint list.
2926 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2927 (reinsert_breakpoint): Rename to ...
2928 (reinsert_raw_breakpoint): ... this.
2929 (reinsert_breakpoints_at): Adjust.
2930 * mem-break.h (struct breakpoint): Declare.
2931 (set_breakpoint_at): Change return type to struct breakpoint
2932 pointer.
2933
2280c721
PA
29342010-03-24 Pedro Alves <pedro@codesourcery.com>
2935
2936 * server.c (handle_query): Assign, not compare.
2937
d50171e4
PA
29382010-03-24 Pedro Alves <pedro@codesourcery.com>
2939
2940 Teach linux gdbserver to step-over-breakpoints.
2941
2942 * linux-low.c (can_hardware_single_step): New.
2943 (supports_breakpoints): New.
2944 (handle_extended_wait): If stopping threads, read the stop pc of
2945 the new cloned LWP.
2946 (get_pc): New.
2947 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2948 low target doesn't support retrieving the PC.
2949 (add_lwp): Set last_resume_kind to resume_continue.
2950 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2951 (linux_attach): Don't clear stop_expected. Set the lwp's
2952 last_resume_kind to resume_stop.
2953 (linux_detach_one_lwp): Don't check for removed breakpoints.
2954 (check_removed_breakpoint): Delete.
2955 (status_pending_p): Rename to ...
2956 (status_pending_p_callback): ... this. Don't check for removed
2957 breakpoints. Don't consider threads that are stopped from GDB's
2958 perspective.
2959 (linux_wait_for_lwp): Always read the stop_pc here.
2960 (cancel_breakpoint): New.
2961 (step_over_bkpt): New global.
2962 (linux_wait_for_event_1): Implement stepping over breakpoints.
2963 (gdb_wants_lwp_stopped): New.
2964 (gdb_wants_all_stopped): New.
2965 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2966 single-step traps here. Store the thread's last reported target
2967 wait status.
2968 (send_sigstop): Don't clear stop_expected. Always set it,
2969 instead.
2970 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2971 (cancel_finished_single_step): New.
2972 (cancel_finished_single_steps): New.
2973 (wait_for_sigstop): Don't cancel finished single-step traps here.
2974 (linux_resume_one_lwp): Don't check for removed breakpoints.
2975 Don't set `step' on non-hardware step archs.
2976 (linux_set_resume_request): Ignore resume_stop requests if already
2977 stopping or stopped. Set the lwp's last_resume_kind.
2978 (resume_status_pending_p): Don't check for removed breakpoints.
2979 (need_step_over_p): New.
2980 (start_step_over): New.
2981 (finish_step_over): New.
2982 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2983 requests. Clear the thread's last reported target waitstatus.
2984 Don't use the `suspended' flag. Don't consider pending breakpoints.
2985 (linux_resume): Start a step-over if necessary.
2986 (proceed_one_lwp): New.
2987 (proceed_all_lwps): New.
2988 (unstop_all_lwps): New.
2989 * linux-low.h (struct lwp_info): Rewrite comment for the
2990 `suspended' flag. Add the `stop_pc' field. Delete the
2991 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2992 Add `'last_resume_kind' and `need_step_over' fields.
2993 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2994 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2995 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2996 (set_raw_breakpoint_at): New.
2997 (set_breakpoint_at): Rewrite to use it.
2998 (reinsert_breakpoint_handler): Delete.
2999 (set_reinsert_breakpoint): New.
3000 (reinsert_breakpoint_by_bp): Delete.
3001 (delete_reinsert_breakpoints): New.
3002 (uninsert_breakpoint): Rewrite.
3003 (uninsert_breakpoints_at): New.
3004 (reinsert_breakpoint): Rewrite.
3005 (reinsert_breakpoints_at): New.
3006 (check_breakpoints): Rewrite.
3007 (breakpoint_here): New.
3008 (breakpoint_inserted_here): New.
3009 (check_mem_read): Adjust.
3010 * mem-break.h (breakpoints_supported, breakpoint_here)
3011 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3012 (reinsert_breakpoint_by_bp): Delete declaration.
3013 (delete_reinsert_breakpoints): Declare.
3014 (reinsert_breakpoint): Delete declaration.
3015 (reinsert_breakpoints_at): Declare.
3016 (uninsert_breakpoint): Delete declaration.
3017 (uninsert_breakpoints_at): Declare.
3018 (check_breakpoints): Adjust prototype.
3019 * server.h: Adjust include order.
3020 (struct thread_info): Declare here. Add a `last_status' field.
3021
30ba68cb
MS
30222010-03-23 Michael Snyder <msnyder@vmware.com>
3023
3024 * server.c (crc32): New function.
3025 (handle_query): Add handling for 'qCRC:' request.
3026
b9a881c2
PA
30272010-03-23 Pedro Alves <pedro@codesourcery.com>
3028
3029 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3030 lwp had been stopped by a watchpoint.
3031
e92d13d5
PA
30322010-03-16 Pedro Alves <pedro@codesourcery.com>
3033
3034 * server.h (internal_error): Declare.
3035 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3036 * utils.c (internal_error): New function.
3037
64daa791
AS
30382010-03-15 Andreas Schwab <schwab@redhat.com>
3039
3040 * configure.srv: Fix typo setting srv_regobj.
3041
f52cd8cd
PA
30422010-03-15 Pedro Alves <pedro@codesourcery.com>
3043
3044 * linux-low.c (fetch_register): Avoid passing a non string literal
3045 format to `error'.
3046 (usr_store_inferior_registers): Ditto.
3047
93ae6fdc
PA
30482010-03-14 Pedro Alves <pedro@codesourcery.com>
3049
3050 * linux-low.c (linux_write_memory): Bail out early if peeking
3051 memory failed.
3052
c3adc08c
PA
30532010-03-14 Pedro Alves <pedro@codesourcery.com>
3054
3055 * linux-low.h (struct lwp_info): New fields
3056 `stopped_by_watchpoint' and `stopped_data_address'.
3057 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3058 here, and cache them in the lwp object.
3059 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3060 directly.
3061 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3062 field.
3063 (linux_stopped_by_watchpoint): Rewrite.
3064 (linux_stopped_data_address): Rewrite.
3065
bce522a2
PA
30662010-03-06 Simo Melenius <simo.melenius@iki.fi>
3067
3068 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3069 switching the current inferior, not before.
3070
90884b2b
L
30712010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3072
3073 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3074 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3075 i386-linux.c and amd64-linux.c.
3076 (reg-i386.o): Removed.
3077 (reg-i386.c): Likewise.
3078 (reg-i386-linux.o): Likewise.
3079 (reg-i386-linux.c): Likewise.
3080 (reg-x86-64.o): Likewise.
3081 (reg-x86-64.c): Likewise.
3082 (reg-x86-64-linux.o): Likewise.
3083 (reg-x86-64-linux.c): Likewise.
3084 (i386.o): New.
3085 (i386.c): Likewise.
3086 (i386-linux.o): Likewise.
3087 (i386-linux.c): Likewise.
3088 (amd64.o): Likewise.
3089 (amd64.c): Likewise.
3090 (amd64-linux.o): Likewise.
3091 (amd64-linux.c): Likewise.
3092
3093 * configure.srv (srv_i386_regobj): New.
3094 (srv_i386_linux_regobj): Likewise.
3095 (srv_amd64_regobj): Likewise.
3096 (srv_amd64_linux_regobj): Likewise.
3097 (srv_i386_32bit_xmlfiles): Likewise.
3098 (srv_i386_64bit_xmlfiles): Likewise.
3099 (srv_i386_xmlfiles): Likewise.
3100 (srv_amd64_xmlfiles): Likewise.
3101 (srv_i386_linux_xmlfiles): Likewise.
3102 (srv_amd64_linux_xmlfiles): Likewise.
3103 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3104 srv_xmlfiles to $srv_i386_xmlfiles.
3105 (i[34567]86-*-mingw32ce*): Likewise.
3106 (i[34567]86-*-mingw*): Likewise.
3107 (i[34567]86-*-nto*): Likewise.
3108 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3109 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3110 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3111 (x86_64-*-linux*): Likewise.
3112
3113 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3114 (init_registers_amd64_linux): New.
3115 (x86_arch_setup): Replace init_registers_x86_64_linux with
3116 init_registers_amd64_linux.
3117
193f13e6
MK
31182010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3119
3120 * configure.ac: Check for libdl. If it is not available link against
3121 static libthread_db.
3122 * configure: Regenerate.
3123
85d721b8
PA
31242010-02-22 Pedro Alves <pedro@codesourcery.com>
3125
3126 PR9605
3127
3128 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3129 handing a read watchpoint.
3130 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3131
6076632b
DE
31322010-02-12 Doug Evans <dje@google.com>
3133
3134 * linux-low.c (linux_supports_tracefork_flag): Document.
3135 (linux_look_up_symbols): Add comment.
3136
3327ccf7
L
31372010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3138
3139 * regcache.c (supply_register): Clear regcache if buf is NULL.
3140
0718675c 31412010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 3142 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
3143
3144 * inferiors.c (find_inferior): Add function documentation.
3145 (unloaded_dll): Handle the case where the unloaded dll has not
3146 been previously registered in the dll list.
3147
177321bd
DJ
31482010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3149
3150 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3151 (thumb2_breakpoint): New.
3152 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3153
2b009048
DJ
31542010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3155
3156 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3157 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3158 breakpoints.
3159
3be029c7
PA
31602010-01-21 Pedro Alves <pedro@codesourcery.com>
3161
3162 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3163
18f5de3b
JK
31642010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3165
3166 * linux-s390-low.c (s390_collect_ptrace_register)
3167 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3168
3743bb4f
DE
31692010-01-21 Doug Evans <dje@google.com>
3170
14ce3065
DE
3171 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3172 (PTRACE_ARG4_TYPE): New macro.
3173 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3174 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3175 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3176 (usr_store_inferior_registers): Ditto.
3177 (linux_read_memory, linux_write_memory): Ditto.
3178 (linux_test_for_tracefork): Ditto.
3179
3743bb4f
DE
3180 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3181 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3182
8b315be5
PA
31832010-01-21 Pedro Alves <pedro@codesourcery.com>
3184
3185 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3186 target.
3187
85492558
PA
31882010-01-21 Pedro Alves <pedro@codesourcery.com>
3189
3190 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3191 prototype to take a regcache. Adjust.
3192
442ea881
PA
31932010-01-20 Pedro Alves <pedro@codesourcery.com>
3194
3195 * regcache.h (struct thread_info): Forward declare.
3196 (struct regcache): New.
3197 (new_register_cache): Adjust prototype.
3198 (get_thread_regcache): Declare.
3199 (free_register_cache): Adjust prototype.
3200 (registers_to_string, registers_from_string): Ditto.
3201 (supply_register, supply_register_by_name, collect_register)
3202 (collect_register_as_string, collect_register_by_name): Ditto.
3203 * regcache.c (struct inferior_regcache_data): Delete.
3204 (get_regcache): Rename to ...
3205 (get_thread_regcache): ... this. Adjust. Switch inferior before
3206 fetching registers.
3207 (regcache_invalidate_one): Adjust.
3208 (regcache_invalidate): Fix prototype.
3209 (new_register_cache): Return the new register cache.
3210 (free_register_cache): Change prototype.
3211 (realloc_register_cache): Adjust.
3212 (registers_to_string): Change prototype to take a regcache. Adjust.
3213 (registers_from_string): Ditto.
3214 (register_data): Ditto.
3215 (supply_register): Ditto.
3216 (supply_register_by_name): Ditto.
3217 (collect_register): Ditto.
3218 (collect_register_as_string): Ditto.
3219 (collect_register_by_name): Ditto.
3220 * server.c (process_serial_event): Adjust.
3221 * linux-low.h (regset_fill_func, regset_store_func): Change
3222 prototype.
3223 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3224 Change prototype.
3225 * linux-low.c (get_stop_pc): Adjust.
3226 (check_removed_breakpoint): Adjust.
3227 (linux_wait_for_event): Adjust.
3228 (linux_resume_one_lwp): Adjust.
3229 (fetch_register): Add regcache parameter. Adjust.
3230 (usr_store_inferior_registers): Ditto.
3231 (regsets_fetch_inferior_registers): Ditto.
3232 (regsets_store_inferior_registers): Ditto.
3233 (linux_fetch_registers, linux_store_registers): Ditto.
3234 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3235 regcache. Adjust.
3236 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3237 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3238 prototype to take a regcache.
3239 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3240 * remote-utils.c (convert_ascii_to_int, outreg)
3241 (prepare_resume_reply): Change prototype to take a regcache.
3242 Adjust.
3243 * target.h (struct target_ops) <fetch_registers, store_registers>:
3244 Change prototype to take a regcache.
3245 (fetch_inferior_registers, store_inferior_registers): Change
3246 prototype to take a regcache. Adjust.
3247 * proc-service.c (ps_lgetregs): Adjust.
3248 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3249 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3250 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3251 take a regcache. Adjust.
3252 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3253 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3254 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3255 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3256 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3257 (cris_cannot_fetch_register):
3258 (cris_breakpoint_at): Change prototype to take a regcache.
3259 Adjust.
3260 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3261 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3262 to take a regcache. Adjust.
3263 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3264 Adjust.
3265 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3266 take a regcache. Adjust.
3267 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3268 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3269 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3270 * linux-mips-low.c (mips_get_pc):
3271 (mips_set_pc): Change prototype to take a regcache. Adjust.
3272 (mips_reinsert_addr): Adjust.
3273 (mips_collect_register): Change prototype to take a regcache.
3274 Adjust.
3275 (mips_supply_register):
3276 (mips_collect_register_32bit, mips_supply_register_32bit)
3277 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3278 (mips_store_fpregset): Ditto.
3279 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3280 Ditto.
3281 (parse_spufs_run): Adjust.
3282 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3283 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3284 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3285 take a regcache. Adjust.
3286 * linux-s390-low.c (s390_collect_ptrace_register)
3287 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3288 (s390_set_pc): Change prototype to take a regcache. Adjust.
3289 (s390_arch_setup): Adjust.
3290 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3291 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3292 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3293 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3294 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3295 regcache. Adjust.
3296 (sparc_breakpoint_at): Adjust.
3297 * linux-xtensa-low.c (xtensa_fill_gregset):
3298 (xtensa_store_gregset):
3299 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3300 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3301 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3302 prototype to take a regcache. Adjust.
3303 * win32-arm-low.c (arm_fetch_inferior_register)
3304 (arm_store_inferior_register): Change prototype to take a
3305 regcache. Adjust.
3306 * win32-i386-low.c (i386_fetch_inferior_register)
3307 (i386_store_inferior_register): Change prototype to take a
3308 regcache. Adjust.
3309 * win32-low.c (child_fetch_inferior_registers)
3310 (child_store_inferior_registers): Change prototype to take a
3311 regcache. Adjust.
3312 (win32_wait): Adjust.
3313 (win32_fetch_inferior_registers): Change prototype to take a
3314 regcache. Adjust.
3315 (win32_store_inferior_registers): Adjust.
3316 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3317 store_inferior_register>: Change prototype to take a regcache.
3318
60c3d7b0
DE
33192010-01-20 Doug Evans <dje@google.com>
3320
3321 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3322 #ifdef.
3323 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 3324 (W_STOPCODE): Provide definition if missing.
60c3d7b0 3325
dc146f7c
VP
33262010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3327
3328 * linux-low.c (linux_core_of_thread): New.
3329 (compare_ints, show_process, list_threads): New.
3330 (linux_qxfer_osdata): Report threads and cores.
3331 (linux_target_op): Register linux_core_of_thread.
3332 * remote-utils.c (prepare_resume_reply): Report the core.
3333 (buffer_xml_printf): Support %d specifier.
3334 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3335 New.
3336 (handle_query): Handle qXfer:threads. Announce availability
3337 thereof.
3338 * target.h (struct target_ops): New field core_of_thread.
3339
7803799a
UW
33402010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3341
3342 * Makefile.in (clean): Remove new generated files.
3343 (reg-s390.o, reg-s390.c): Remove rules.
3344 (reg-s390x.o, reg-s390x.c): Likewise.
3345 (s390-linux32.o, s390-linux32.c): Add rules.
3346 (s390-linux64.o, s390-linux64.c): Likewise.
3347 (s390x-linux64.o, s390x-linux64.c): Likewise.
3348 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3349 * linux-s390-low.c: Include <elf.h>.
3350 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3351 (init_registers_s390): Remove prototype.
3352 (init_registers_s390x): Likewise.
3353 (init_registers_s390_linux32): Add prototype.
3354 (init_registers_s390_linux64): Likewise.
3355 (init_registers_s390x_linux64): Likewise.
3356 (s390_num_regs_3264): New define.
3357 (s390_regmap_3264): New global variable.
3358 (s390_cannot_fetch_register): Remove obsolete check.
3359 (s390_cannot_store_register): Likewise.
3360 (s390_collect_ptrace_register): Handle upper/lower register halves.
3361 (s390_supply_ptrace_register): Likewise.
3362 (s390_fill_gregset): Update to register number changes.
3363 (s390_get_hwcap): New routine.
3364 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3365 Install appropriate regmap and register set.
3366
6e7ffa39
JB
33672010-01-01 Joel Brobecker <brobecker@adacore.com>
3368
3369 * server.c (gdbserver_version): Update copyright year to 2010.
3370 * gdbreplay.c (gdbreplay_version): Likewise.
3371
957f3f49
DE
33722009-12-28 Doug Evans <dje@google.com>
3373
3374 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3375 elf/external.h. Include <elf.h> instead but only if necessary.
3376
ca5c370d
PA
33772009-12-28 Pedro Alves <pedro@codesourcery.com>
3378
3379 * linux-low.c (linux_remove_process): Remove `detaching'
3380 parameter. Don't release/detach from thread_db here.
3381 (linux_kill): Release/detach from thread_db here, ...
3382 (linux_detach): ... and here, before actually detaching.
3383 (linux_wait_1): ... and here, when a process exits.
3384 * thread-db.c (any_thread_of): New.
3385 (thread_db_free): Switch the current inferior to a thread of the
3386 passed in process.
3387
4ee62156
DE
33882009-12-21 Doug Evans <dje@google.com>
3389
d90e6a88
DE
3390 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3391
c5f62d5f
DE
3392 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3393 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3394 warning ifndef __NR_tkill. Move setting of errno there too.
3395 Delete unnecessary resetting of errno after syscall.
3396 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3397
10e86dd7
DE
3398 * configure.ac: Check for dladdr.
3399 * config.in: Regenerate.
3400 * configure: Regenerate.
3401 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3402 (try_thread_db_load): Update.
3403
4ee62156
DE
3404 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3405
00f515da
DE
34062009-12-18 Doug Evans <dje@google.com>
3407
e9464885
DE
3408 * event-loop.c: Include unistd.h if it exists.
3409
07d4f67e
DE
3410 * linux-low.c (my_waitpid): Move definition away from being in
3411 between linux_tracefork_child/linux_test_for_tracefork.
3412
00f515da
DE
3413 * gdb_proc_service.h (psaddr_t): Fix type.
3414 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3415 signature to match glibc.
3416
1de1badb
DE
34172009-12-16 Doug Evans <dje@google.com>
3418
3419 * linux-low.c (linux_read_memory): Fix argument to read.
3420
aeeb81d1
PA
34212009-11-26 Pedro Alves <pedro@codesourcery.com>
3422
3423 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3424 events, don't leave current_inferior pointing at null.
3425
10357975
PA
34262009-11-26 Pedro Alves <pedro@codesourcery.com>
3427
3428 * win32-low.c (LOG): Delete.
3429 (OUTMSG): Output to stderr.
3430 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3431 on compile time LOG macro.
3432 (win32_wait): Fix debug output.
3433
cf6e3471
PA
34342009-11-26 Pedro Alves <pedro@codesourcery.com>
3435
3436 * win32-low.c (win32_add_one_solib): If the dll name is
3437 "ntdll.dll", prepend the system directory to the dll path.
3438
0c85e18e
MK
34392009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3440
3441 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3442
9ac544ce 34432009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 3444 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
3445
3446 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3447 * configure.ac: Check for __mcoldfire__ and set
3448 gdb_cv_m68k_is_coldfire.
3449 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3450 reg-cf.o and reg-m68k.o.
3451 * configure: Regenerated.
3452
fd7dd3e6
PA
34532009-11-16 Pedro Alves <pedro@codesourcery.com>
3454
3455 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3456 Pass it to thread_db_free.
3457 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3458 proper `detaching' argument to linux_remove_process.
3459 * linux-low.h (thread_db_free): Add `detaching' parameter.
3460 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3461 to thread_db_free.
3462 (thread_db_free): Add `detaching' parameter. Only
3463 call td_ta_clear_event if detaching from process.
3464
75aa492e
MK
34652009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3466
3467 * thread-db.c (thread_db_free): Fix typo.
3468
21e1bee4
PP
34692009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3470
3471 PR gdb/10838
3472 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3473
8838b45e
NS
34742009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3475
3476 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3477 with an i686 compiler.
3478 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3479 needed.
3480 * configure: Rebuilt.
3481
8a35fb51
SL
34822009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3483
3484 PR gdb/10783
3485
3486 * server.c (handle_search_memory_1): Correct read_addr initialization
3487 in loop for searching subsequent chunks.
3488
96f15937
PP
34892009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3490
3491 * configure.ac: New --with-libthread-db option.
3492 * thread-db.c: Allow direct dependence on libthread_db.
3493 (thread_db_free): Adjust.
3494 * config.in: Regenerate.
3495 * configure: Likewise.
889bf7c5 3496
5f7d1694
PP
34972009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3498
3499 PR gdb/10757
3500 * thread-db.c (attach_thread): New function.
3501 (maybe_attach_thread): Return success/failure.
3502 (find_new_threads_callback): Adjust.
889bf7c5
PA
3503 (thread_db_find_new_threads): Loop until no new threads.
3504
88e3b899
PA
35052009-10-13 Pedro Alves <pedro@codesourcery.com>
3506
3507 * proc-service.c (ps_lgetregs): Formatting.
3508
cdbfd419
PP
35092009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3510
3511 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3512 * configure.ac: Adjust.
3513 * linux-low.h (struct process_info_private): Move members to struct
3514 thread_db.
3515 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3516 * linux-low.c (linux_remove_process): Adjust.
3517 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3518 * server.c (handle_query): Move code ...
3519 (handle_monitor_command): ... here. New function.
3520 * target.h (struct target_ops): New member.
3521 * thread-db.c (struct thread_db): New.
3522 (libthread_db_search_path): New variable.
3523 (thread_db_create_event, thread_db_enable_reporting)
3524 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3525 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3526 (try_thread_db_load_1, dladdr_to_soname): New functions.
3527 (try_thread_db_load, thread_db_load_search): New functions.
3528 (thread_db_init): Search for libthread_db.
3529 (thread_db_free): New function.
3530 (thread_db_handle_monitor_command): Likewise.
3531 * config.in: Regenerate.
3532 * configure: Regenerate.
889bf7c5 3533
4168d2d6
UW
35342009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3535
3536 * spu-low.c (spu_kill): Wait for inferior to terminate.
3537 Call clear_inferiors.
3538 (spu_detach): Call clear_inferiors.
3539
81ecdfbb
RW
35402009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3541
3542 * aclocal.m4: Regenerate.
3543 * config.in: Likewise.
3544 * configure: Likewise.
3545
0b9ff2c0
UW
35462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3547
3548 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3549 (parse_spufs_run): New function.
3550 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3551 (ppc_breakpoint_at): Handle SPU breakpoints.
3552
efcbbd14
UW
35532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3554
3555 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3556 (SPUFS_MAGIC): Define.
3557 (spu_enumerate_spu_ids): New function.
3558 (linux_qxfer_spu): New function.
3559 (linux_target_ops): Install linux_qxfer_spu.
3560
f4d9bade
UW
35612009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3562
3563 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3564 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3565 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3566 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3567 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3568 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3569 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3570 (init_registers_powerpc_cell32l): Add prototype.
3571 (init_registers_powerpc_cell64l): Likewise.
3572 (ppc_arch_setup): Detect Cell/B.E. architecture.
3573
96e946ca
RW
35742009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3575
3576 * Makefile.in (datarootdir): New variable.
3577
58d6951d
DJ
35782009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3579
3580 * linux-low.c (linux_write_memory): Update debugging output.
3581 * Makefile.in (clean): Add new descriptions.
3582 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3583 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3584 * configure.srv: Add new files for arm*-*-linux*.
3585 * linux-arm-low.c: Add new declarations.
3586 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3587 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3588 (HWCAP_VFPv3D16): New.
3589 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3590 instead of __IWMMXT__.
3591 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3592 (arm_arch_setup): New.
3593 (target_regsets): Remove #ifdef. Add VFP regset.
3594 (the_low_target): Use arm_arch_setup.
3595
12b42a12
DJ
35962009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3597
3598 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3599 the main thread again.
3600
ac8c974e
AR
36012009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3602
3603 Adding Neutrino gdbserver.
3604 * configure: Regenerated.
3605 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3606 * configure.srv (i[34567]86-*-nto*): New target.
3607 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3608 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3609 (nto_comctrl) [__QNX__]: New function.
3610 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3611
4424e0c3 36122009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
3613
3614 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3615 srv_tgtobj.
3616
912cf4ba
PA
36172009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3618 Pedro Alves <pedro@codesourcery.com>
3619
3620 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3621 don't support CONTEXT_EXTENDED_REGISTERS.
3622 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3623 (the_low_target): Install them.
3624 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3625 failing with ERROR_PIPE_NOT_CONNECTED.
3626
aa5ca48f
DE
36272009-06-30 Doug Evans <dje@google.com>
3628 Pierre Muller <muller@ics.u-strasbg.fr>
3629
3630 Add h/w watchpoint support to x86-linux, win32-i386.
3631 * Makefile.in (SFILES): Add i386-low.c
3632 (i386_low_h): Define.
3633 (i386-low.o): Add dependencies.
3634 (linux-x86-low.o): Add i386-low.h dependency.
3635 (win32-i386-low.o): Ditto.
3636 * i386-low.c: New file.
3637 * i386-low.h: New file.
3638 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3639 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3640 * linux-low.c (linux_add_process): Initialize arch_private.
3641 (linux_remove_process): Free arch_private.
3642 (add_lwp): Initialize arch_private.
3643 (delete_lwp): Free arch_private.
3644 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3645 provided.
3646 * linux-low.h (process_info_private): New member arch_private.
3647 (lwp_info): New member arch_private.
3648 (linux_target_ops): New members new_process, new_thread,
3649 prepare_to_resume.
3650 (ptid_of): New macro.
3651 * linux-x86-low.c: Include stddef.h, i386-low.h.
3652 (arch_process_info): New struct.
3653 (arch_lwp_info): New struct.
3654 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3655 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3656 (i386_dr_low_get_status): New function.
3657 (x86_insert_point, x86_remove_point): New functions.
3658 (x86_stopped_by_watchpoint): New function.
3659 (x86_stopped_data_address): New function.
3660 (x86_linux_new_process, x86_linux_new_thread): New functions.
3661 (x86_linux_prepare_to_resume): New function.
3662 (the_low_target): Add entries for insert_point, remove_point,
3663 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3664 prepare_to_resume.
3665 * server.c (debug_hw_points): New global.
3666 (monitor_show_help): Document set debug-hw-points.
3667 (handle_query): Process "set debug-hw-points".
3668 * server.h (debug_hw_points): Declare.
3669 (paddress): Declare.
3670 * utils.c (NUMCELLS, CELLSIZE): New macros.
3671 (get_sell, xsnprintf, paddress): New functions.
3672 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3673 remove_point, stopped_by_watchpoint, stopped_data_address.
3674 * win32-i386-low.c: Include i386-low.h.
3675 (debug_reg_state): Replaces dr.
3676 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3677 (i386_dr_low_get_status): New function.
3678 (i386_insert_point, i386_remove_point): New functions.
3679 (i386_stopped_by_watchpoint): New function.
3680 (i386_stopped_data_address): New function.
3681 (i386_initial_stuff): Update.
3682 (get_thread_context,set_thread_context,i386_thread_added): Update.
3683 (the_low_target): Add entries for insert_point,
3684 remove_point, stopped_by_watchpoint, stopped_data_address.
3685 * win32-low.c (win32_insert_watchpoint): New function.
3686 (win32_remove_watchpoint): New function.
3687 (win32_stopped_by_watchpoint): New function.
3688 (win32_stopped_data_address): New function.
3689 (win32_target_ops): Add entries for insert_watchpoint,
3690 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3691 * win32-low.h (win32_target_ops): New members insert_point,
3692 remove_point, stopped_by_watchpoint, stopped_data_address.
3693
d993e290
PA
36942009-06-25 Pedro Alves <pedro@codesourcery.com>
3695
3696 * server.c (process_serial_event): Re-return unsupported, not
3697 error, if the type isn't recognized. Re-allow supporting only
3698 insert or remove packets. Also call require_running for
3699 breakpoints. Add missing break statement to default case. Tidy.
3700 * target.h (struct target_ops): Rename insert_watchpoint to
3701 insert_point, and remove_watchpoint to remove_point.
3702
3703 * linux-low.h (struct linux_target_ops): Likewise.
3704 * linux-low.c (linux_insert_watchpoint): Rename to ...
3705 (linux_insert_point): ... this. Adjust.
3706 (linux_remove_watchpoint): Rename to ...
3707 (linux_remove_point): ... this. Adjust.
3708 (linux_target_ops): Adjust.
3709 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3710 (cris_insert_point): ... this.
3711 (cris_remove_watchpoint): Rename to ...
3712 (cris_remove_point): ... this.
3713 (the_low_target): Adjust.
3714
0f54c268
PM
37152009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3716
3717 * server.c (handle_v_kill): Pass signal_pid to
3718 kill_inferior if multi_process is zero.
3719
c6314022
AR
37202009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3721
3722 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3723 * target.h (target_ops): Comment for *_watchpoint to make it clear
3724 the functions can get types '0' and '1'.
3725
4463ce24
AR
37262009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3727
3728 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3729 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3730 * regcache.c (get_regcache): Likewise.
3731 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3732 * win32-low.c (child_fetch_inferior_registers): Remove check for
3733 regno 0.
3734
cf8fd78b
PA
37352009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3736 Pedro Alves <pedro@codesourcery.com>
3737
3738 * target.h (struct target_ops) <supports_multi_process>: New
3739 callback.
3740 (target_supports_multi_process): New.
3741 * server.c (handle_query): Even if GDB reports support, only
3742 enable multi-process if the target also supports it. Report
3743 multi-process support only if the target backend supports it.
3744 * linux-low.c (linux_supports_multi_process): New function.
3745 (linux_target_ops): Install it as target_supports_multi_process
3746 callback.
3747
47c0c975
DE
37482009-05-24 Doug Evans <dje@google.com>
3749
e09875d4
DE
3750 Global renaming of find_thread_pid to find_thread_ptid.
3751 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3752 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3753 All callers updated.
3754
e27d73f6
DE
3755 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3756 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3757 directly.
3758
47c0c975
DE
3759 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3760 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3761 (linux_resume_one_lwp): Ditto.
3762
2acc282a
DE
37632009-05-23 Doug Evans <dje@google.com>
3764
3765 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3766 from struct inferior_list_entry * to struct lwp_info *.
3767 All callers updated.
3768
9f1036c1
DE
37692009-05-13 Doug Evans <dje@google.com>
3770
3771 * linux-x86-low.c: Don't include assert.h.
3772 (x86_siginfo_fixup): Use fatal, not assert.
3773 (x86_arch_setup): Fix comment.
3774
d0722149
DE
37752009-05-12 Doug Evans <dje@google.com>
3776
3777 Biarch support for i386/amd64 gdbserver.
3778 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3779 Add linux-x86-low.c.
3780 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3781 (linux-x86-low.o): Add.
3782 * linux-x86-64-low.c: Delete.
3783 * linux-i386-low.c: Delete.
3784 * linux-x86-low.c: New file.
3785 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3786 linux-x86-low.o.
3787 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3788 linux-x86-low.o.
3789 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3790 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3791 (linux_child_pid_to_exec_file): New function.
3792 (elf_64_header_p, elf_64_file_p): New functions.
3793 (siginfo_fixup): New function.
3794 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3795 give target a chance to convert layout.
3796 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3797 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3798
fdeb2a12
DE
37992009-05-07 Doug Evans <dje@google.com>
3800
3801 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3802 (regsets_store_inferior_registers): Ditto.
3803
a6dbe5df
PA
38042009-05-06 Pedro Alves <pedro@codesourcery.com>
3805
3806 PR server/10048
3807
3808 * linux-low.c (must_set_ptrace_flags): Delete.
3809 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3810 of the global.
3811 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3812 `lwp->must_set_ptrace_flags' instead.
ba42693b 3813 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
3814 (linux_wait_1): ... not here.
3815
5091eb23
DE
38162009-04-30 Doug Evans <dje@google.com>
3817
9f767825
DE
3818 * inferiors.c (started_inferior_callback): New function.
3819 (attached_inferior_callback): New function.
3820 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3821 * server.c (print_started_pid, print_attached_pid): New functions.
3822 (detach_or_kill_for_exit): New function.
3823 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3824 * server.h (have_started_inferiors_p): Declare.
3825 (have_attached_inferiors_p): Declare.
3826
5091eb23
DE
3827 * inferiors.c (remove_process): Fix memory leak, free process.
3828 * linux-low.c (linux_remove_process): New function.
3829 (linux_kill): Call it instead of remove_process.
3830 (linux_detach, linux_wait_1): Ditto.
3831
155c8968
PA
38322009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3833
3834 * configure.srv: Add x86 Windows CE target.
3835
7fe519cb
UW
38362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3837
3838 * inferiors.c (get_thread_process): Make global.
3839 * server.h (get_thread_process): Add prototype.
3840 * thread-db.c (find_one_thread): Use get_thread_process
3841 instead of current_process.
3842 (thread_db_get_tls_address): Do not crash if called when
3843 thread layer is not yet initialized.
3844
5472f405
UW
38452009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3846
3847 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3848 * spu-low.c (current_tid): Rename to ...
3849 (current_ptid): ... this.
3850 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3851 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3852 ptid_get_lwp (current_ptid) instead of current_tid.
3853 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3854 instead of current_tid. Use find_process_pid to verify pid
3855 argument is valid. Pass proper argument to remove_process.
3856 (spu_thread_alive): Compare current_ptid instead of current_tid.
3857 (spu_resume): Likewise.
3858
55ac2b99
PA
38592009-04-02 Pedro Alves <pedro@codesourcery.com>
3860
3861 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3862 variable.
3863
95954743
PA
38642009-04-01 Pedro Alves <pedro@codesourcery.com>
3865
3866 Implement the multiprocess extensions, and add linux multiprocess
3867 support.
3868
3869 * server.h (ULONGEST): Declare.
3870 (struct ptid, ptid_t): New.
3871 (minus_one_ptid, null_ptid): Declare.
3872 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3873 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3874 (struct inferior_list_entry): Change `id' type from unsigned from
3875 to ptid_t.
3876 (struct sym_cache, struct breakpoint, struct
3877 process_info_private): Forward declare.
3878 (struct process_info): Declare.
3879 (current_process): Declare.
3880 (all_processes): Declare.
3881 (initialize_inferiors): Declare.
3882 (add_thread): Adjust to use ptid_t.
3883 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3884 (add_process, remove_process, find_thread_pid): Declare.
3885 (find_inferior_id): Adjust to use ptid_t.
3886 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3887 (multi_process): Declare.
3888 (push_event): Adjust to use ptid_t.
3889 (read_ptid, write_ptid): Declare.
3890 (prepare_resume_reply): Adjust to use ptid_t.
3891 (clear_symbol_cache): Declare.
3892 * inferiors.c (all_processes): New.
3893 (null_ptid, minus_one_ptid): New.
3894 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3895 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3896 (add_thread): Change unsigned long to ptid. Remove gdb_id
3897 parameter. Adjust.
3898 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3899 (gdb_id_to_thread): Rename to ...
3900 (find_thread_pid): ... this. Change unsigned long to ptid.
3901 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3902 (loaded_dll, pull_pid_from_list): Adjust.
3903 (add_process, remove_process, find_process_pid)
3904 (get_thread_process, current_process, initialize_inferiors): New.
3905 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3906 (struct target_waitstatus) <related_pid>: Ditto.
3907 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3908 return type to int.
3909 (struct target_ops) <join>: Add `pid' argument.
3910 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3911 (struct target_ops) <wait>: Add `ptid' field. Change return type
3912 to ptid.
3913 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3914 (mywait): Add `ptid' argument. Change return type to ptid_t.
3915 (target_pid_to_str): Declare.
3916 * target.c (set_desired_inferior): Adjust to use ptids.
3917 (mywait): Add new `ptid' argument. Adjust.
3918 (target_pid_to_str): New.
3919 * mem-break.h (free_all_breakpoints): Declare.
3920 * mem-break.c (breakpoints): Delelete.
3921 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3922 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3923 to use per-process breakpoint list.
3924 (free_all_breakpoints): New.
3925 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3926 (symbol_cache, all_symbols_looked_up): Delete.
3927 (hexchars): New.
3928 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3929 read_ptid): New.
3930 (prepare_resume_reply): Change ptid argument's type from unsigned
3931 long to ptid_t. Adjust. Implement W;process and X;process.
3932 (free_sym_cache, clear_symbol_cache): New.
3933 (look_up_one_symbol): Adjust to per-process symbol cache. *
3934 * server.c (cont_thread, general_thread, step_thread): Change type
3935 to ptid_t.
3936 (attached): Delete.
3937 (multi_process): New.
3938 (last_ptid): Change type to ptid_t.
3939 (struct vstop_notif) <ptid>: Change type to ptid_t.
3940 (queue_stop_reply, push_event): Change `ptid' argument's type to
3941 ptid_t.
3942 (discard_queued_stop_replies): Add `pid' argument.
3943 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3944 changes. Don't reference the `attached' global.
3945 (attach_inferior): Adjust to mywait interface changes.
3946 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3947 features. Handle and report "multiprocess+". Handle
3948 "qAttached:PID".
3949 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3950 changes.
3951 (handle_v_kill): New.
3952 (handle_v_stopped): Adjust to use target_pid_to_str.
3953 (handle_v_requests): Allow multiple attaches and runs when
3954 multiprocess extensions are in effect. Handle "vKill".
3955 (myresume): Adjust to use ptids.
3956 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3957 (handle_status): Adjust to discard_queued_stop_replies interface
3958 change.
3959 (first_thread_of, kill_inferior_callback)
3960 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3961 (main): Call initialize_inferiors. Adjust to use ptids, killing
3962 and detaching from all inferiors. Handle multiprocess packet
3963 variants.
3964 * linux-low.h: Include gdb_proc_service.h.
3965 (struct process_info_private): New.
3966 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3967 <lwpid_of>: Use ptid_get_lwp.
3968 (get_lwp_thread): Adjust.
3969 (struct lwp_info): Add `dead' member.
3970 (find_lwp_pid): Declare.
3971 * linux-low.c (thread_db_active): Delete.
3972 (new_inferior): Adjust comment.
3973 (inferior_pid): Delete.
3974 (linux_add_process): New.
3975 (handle_extended_wait): Adjust.
3976 (add_lwp): Change unsigned long to ptid.
3977 (linux_create_inferior): Add process to processes table. Adjust
3978 to use ptids. Don't set new_inferior here.
3979 (linux_attach_lwp): Rename to ...
3980 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3981 it. Adjust to use ptids.
3982 (linux_attach_lwp): New.
3983 (linux_attach): Add process to processes table. Don't set
3984 new_inferior here.
3985 (struct counter): New.
3986 (second_thread_of_pid_p, last_thread_of_process_p): New.
3987 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3988 multiple processes.
3989 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3990 processes. Remove process from process table.
3991 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3992 to multiple processes.
3993 (any_thread_of): New.
3994 (linux_detach): Add `pid' argument, and handle it. Remove process
3995 from processes table.
3996 (linux_join): Add `pid' argument. Handle it.
3997 (linux_thread_alive): Change unsighed long argument to ptid_t.
3998 Consider dead lwps as not being alive.
3999 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4000 threads we're not interested in.
4001 (same_lwp, find_lwp_pid): New.
4002 (linux_wait_for_lwp): Change `pid' argument's type from int to
4003 ptid_t. Adjust.
4004 (linux_wait_for_event): Rename to ...
4005 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4006 from int to ptid_t. Adjust.
4007 (linux_wait_for_event): New.
4008 (linux_wait_1): Add `ptid' argument. Change return type to
4009 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4010 that exit from the process table.
4011 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4012 Adjust.
4013 (mark_lwp_dead): New.
4014 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4015 stopping all threads, mark its main lwp as dead.
4016 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4017 ptids.
4018 (fetch_register, usr_store_inferior_registers)
4019 (regsets_fetch_inferior_registers)
4020 (regsets_store_inferior_registers, linux_read_memory)
4021 (linux_write_memory): Inline `inferior_pid'.
4022 (linux_look_up_symbols): Adjust to use per-process
4023 `thread_db_active'.
4024 (linux_request_interrupt): Adjust to use ptids.
4025 (linux_read_auxv): Inline `inferior_pid'.
4026 (initialize_low): Don't reference thread_db_active.
4027 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4028 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4029 (ps_getpid): Return the pid of the current inferior.
4030 * thread-db.c (proc_handle, thread_agent): Delete.
4031 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4032 per-process data.
4033 (find_one_thread): Change argument type to ptid_t. Adjust to
4034 per-process data.
4035 (maybe_attach_thread): Adjust to per-process data and ptids.
4036 (thread_db_find_new_threads): Ditto.
4037 (thread_db_init): Ditto.
4038 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4039 processes table. Adjust to use ptids.
4040 (spu_kill, spu_detach): Adjust interface. Remove process from
4041 processes table.
4042 (spu_join, spu_thread_alive): Adjust interface.
4043 (spu_wait): Adjust interface. Remove process from processes
4044 table. Adjust to use ptids.
4045 * win32-low.c (current_inferior_tid): Delete.
4046 (current_inferior_ptid): New.
4047 (debug_event_ptid): New.
4048 (thread_rec): Take a ptid. Adjust.
4049 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4050 (child_delete_thread): Ditto.
4051 (do_initial_child_stuff): Add `attached' argument. Add process to
4052 processes table.
4053 (child_fetch_inferior_registers, child_store_inferior_registers):
4054 Adjust.
4055 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4056 (win32_attach): Pass 1 to do_initial_child_stuff.
4057 (win32_kill): Adjust interface. Remove process from processes
4058 table.
4059 (win32_detach): Ditto.
4060 (win32_join): Adjust interface.
4061 (win32_thread_alive): Take a ptid.
4062 (win32_resume): Adjust to use ptids.
4063 (get_child_debug_event): Ditto.
4064 (win32_wait): Adjust interface. Remove exiting process from
4065 processes table.
4066
bd99dc85
PA
40672009-04-01 Pedro Alves <pedro@codesourcery.com>
4068
4069 Non-stop mode support.
4070
4071 * server.h (non_stop): Declare.
4072 (gdb_client_data, handler_func): Declare.
4073 (delete_file_handler, add_file_handler, start_event_loop):
4074 Declare.
4075 (handle_serial_event, handle_target_event, push_event)
4076 (putpkt_notif): Declare.
4077 * target.h (enum resume_kind): New.
4078 (struct thread_resume): Replace `step' field by `kind' field.
4079 (TARGET_WNOHANG): Define.
4080 (struct target_ops) <wait>: Add `options' argument.
4081 <supports_non_stop, async, start_non_stop>: New fields.
4082 (target_supports_non_stop, target_async): New.
4083 (start_non_stop): Declare.
4084 (mywait): Add `options' argument.
4085 * target.c (mywait): Add `options' argument. Print child exit
4086 notifications here.
4087 (start_non_stop): New.
4088 * server.c (non_stop, own_buf, mem_buf): New globals.
4089 (struct vstop_notif): New.
4090 (notif_queue): New global.
4091 (queue_stop_reply, push_event, discard_queued_stop_replies)
4092 (send_next_stop_reply): New.
4093 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4094 interface changes.
4095 (attach_inferior): In non-stop mode, don't wait for the target
4096 here.
4097 (handle_general_set): Handle QNonStop.
4098 (handle_query): When handling qC, return the current general
4099 thread, instead of the first thread of the list.
4100 (handle_query): If the backend supports non-stop mode, include
4101 QNonStop+ in the qSupported query response.
4102 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4103 and non-stop mode.
4104 (handle_v_attach, handle_v_run): Handle non-stop mode.
4105 (handle_v_stopped): New.
4106 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4107 (myresume): Adjust to use resume_kind. Handle non-stop.
4108 (queue_stop_reply_callback): New.
4109 (handle_status): Handle non-stop mode.
4110 (main): Clear non_stop flag on reconnection. Use the event-loop.
4111 Refactor serial protocol handling from here ...
4112 (process_serial_event): ... to this new function. When GDB
4113 selects any thread, select one here. In non-stop mode, wait until
4114 GDB acks all pending events before exiting.
4115 (handle_serial_event, handle_target_event): New.
4116 * remote-utils.c (remote_open): Install remote_desc in the event
4117 loop.
4118 (remote_close): Remove remote_desc from the event loop.
4119 (putpkt_binary): Rename to...
4120 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4121 (putpkt_binary): New as wrapper around putpkt_binary_1.
4122 (putpkt_notif): New.
4123 (prepare_resume_reply): In non-stop mode, don't change the
4124 general_thread.
4125 * event-loop.c: New.
4126 * Makefile.in (OBJ): Add event-loop.o.
4127 (event-loop.o): New rule.
4128
4129 * linux-low.h (pid_of): Moved here.
4130 (lwpid_of): New.
4131 (get_lwp_thread): Use lwpid_of.
4132 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4133 * linux-low.c (pid_of): Delete.
4134 (inferior_pid): Use lwpid_of.
4135 (linux_event_pipe): New.
4136 (target_is_async_p): New.
4137 (delete_lwp): New.
4138 (handle_extended_wait): Use lwpid_of.
4139 (add_lwp): Don't set lwpid field.
4140 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4141 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4142 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4143 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4144 first. Adjust to linux_wait_for_event interface changes. Use
4145 lwpid_of.
4146 (linux_detach): Don't delete the main lwp here.
4147 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4148 (status_pending_p): Don't consider explicitly suspended lwps.
4149 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4150 pointer. Add OPTIONS argument. Change return type to int. Use
4151 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4152 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4153 pointer. Add status pointer argument. Return a pid instead of a
4154 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4155 changes. In non-stop mode, don't switch to a random thread.
4156 (linux_wait): Rename to...
4157 (linux_wait_1): ... this. Add target_options argument, and handle
4158 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4159 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4160 clean exit and signal exit code. Don't stop all threads in
4161 non-stop mode. In all-stop mode, only stop all threads when
4162 reporting a stop to GDB. Handle explicit thread stop requests.
4163 (async_file_flush, async_file_mark): New.
4164 (linux_wait): New.
4165 (send_sigstop): Use lwpid_of.
4166 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4167 interface changes. In non-stop mode, don't switch to a random
4168 thread.
4169 (linux_resume_one_lwp): Use lwpid_of.
4170 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4171 (linux_resume_one_thread): ... this. Handle resume_stop. In
4172 non-stop mode, don't look for pending flag in all threads.
4173 (resume_status_pending_p): Don't consider explicitly suspended
4174 threads.
4175 (my_waitpid): Reimplement. Emulate __WALL.
4176 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4177 Use lwpid_of.
4178 (sigchld_handler, linux_supports_non_stop, linux_async)
4179 (linux_start_non_stop): New.
4180 (linux_target_ops): Register linux_supports_non_stop, linux_async
4181 and linux_start_non_stop.
4182 (initialize_low): Install SIGCHLD handler.
4183 * thread-db.c (thread_db_create_event, find_one_thread)
4184 (thread_db_get_tls_address): Use lwpid_of.
4185 * win32-low.c (win32_detach): Adjust to use resume_kind.
4186 (win32_wait): Add `options' argument.
4187 * spu-low.c (spu_resume): Adjust to use resume_kind.
4188 (spu_wait): Add `options' argument.
4189
5b1c542e
PA
41902009-04-01 Pedro Alves <pedro@codesourcery.com>
4191
4192 Decouple target code from remote protocol.
4193
4194 * target.h (enum target_waitkind): New.
4195 (struct target_waitstatus): New.
4196 (struct target_ops) <wait>: Return an unsigned long. Take a
4197 target_waitstatus pointer instead of a char pointer.
4198 (mywait): Likewise.
4199 * target.c (mywait): Change prototype to return an unsigned long.
4200 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4201 * server.h (thread_from_wait, old_thread_from_wait): Delete
4202 declarations.
4203 (prepare_resume_reply): Change prototype to take a
4204 target_waitstatus.
4205 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4206 (last_status, last_ptid): New.
4207 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4208 pid instead of a signal.
4209 (attach_inferior): Remove "status" and "signal" parameters.
4210 Adjust.
4211 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4212 not as an address.
4213 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4214 (handle_v_requests, myresume): Remove "status" and "signal"
4215 parameters. Adjust.
4216 (handle_status): New.
4217 (main): Delete local `status'. Adjust.
4218 * remote-utils.c: Include target.h.
4219 (prepare_resume_reply): Change prototype to take a
4220 target_waitstatus. Adjust.
4221
4222 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4223 interface.
4224 * spu-low.c (spu_wait): Adjust.
4225 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4226 Delete.
4227 (win32_wait): Adjust.
4228
2bd7c093
PA
42292009-04-01 Pedro Alves <pedro@codesourcery.com>
4230
4231 * target.h (struct thread_resume): Delete leave_stopped member.
4232 (struct target_ops): Add a `n' argument to the `resume' callback.
4233 * server.c (start_inferior): Adjust.
4234 (handle_v_cont, myresume): Adjust.
4235 * linux-low.c (check_removed_breakpoint): Adjust to resume
4236 interface change, and to removed leave_stopped field.
4237 (resume_ptr): Delete.
4238 (struct thread_resume_array): New.
4239 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4240 resume interface change.
4241 (linux_continue_one_thread, linux_queue_one_thread)
4242 (resume_status_pending_p): Check if the resume field is NULL
4243 instead of checking the leave_stopped member.
4244 (linux_resume): Adjust to the target resume interface change.
4245 * spu-low.c (spu_resume): Adjust to the target resume interface
4246 change.
4247 * win32-low.c (win32_detach, win32_resume): Ditto.
4248
c35fafde
PA
42492009-04-01 Pedro Alves <pedro@codesourcery.com>
4250
4251 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4252 flag.
4253 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4254 pending.
4255 (linux_continue_one_thread): Only preserve the stepping flag if
4256 there's a pending breakpoint.
4257
0a59d50b
PA
42582009-03-31 Pedro Alves <pedro@codesourcery.com>
4259
4260 * server.c (main): After the inferior having exited, call
4261 remote_close before exiting gdbserver.
4262
f04c6d38
TJB
42632009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4264
4265 Fix size of FPSCR in Power 7 processors.
4266 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4267 (PPC_FEATURE_HAS_DFP): New #define.
4268 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4269 size of the FPSCR.
4270
78e5cee6
PA
42712009-03-23 Pedro Alves <pedro@codesourcery.com>
4272
4273 * server.c (handle_query) Whitespace and formatting.
4274
1b3f6016
PA
42752009-03-22 Pedro Alves <pedro@codesourcery.com>
4276
4277 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4278 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4279 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4280 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4281 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4282 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4283 Makefile.in, configure.ac: Fix whitespace throughout.
4284 * configure: Regenerate.
4285
a07b2135
PA
42862009-03-22 Pedro Alves <pedro@codesourcery.com>
4287
4288 * inferiors.c (find_inferior): Make it safe for the callback
4289 function to delete the currently iterated inferior.
4290
67cc2626
PA
42912009-03-22 Pedro Alves <pedro@codesourcery.com>
4292
4293 * Makefile.in (linuw_low_h): Move higher.
4294 (thread-db.o): Depend on $(linux_low_h).
4295
54a0b537
PA
42962009-03-17 Pedro Alves <pedro@codesourcery.com>
4297
4298 Rename "process" to "lwp" throughout.
4299
4300 * linux-low.c (all_processes): Rename to...
4301 (all_lwps): ... this.
4302 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4303 (add_process): Rename to ...
4304 (add_lwp): ... this. Adjust.
4305 (linux_create_inferior): Adjust.
4306 (linux_attach_lwp): Adjust.
4307 (linux_attach): Adjust.
4308 (linux_kill_one_process): Rename to ...
4309 (linux_kill_one_lwp): ... this. Adjust.
4310 (linux_kill): Adjust.
4311 (linux_detach_one_process): Rename to ...
4312 (linux_detach_one_lwp): ... this. Adjust.
4313 (linux_detach): Adjust.
4314 (check_removed_breakpoint): Adjust.
4315 (status_pending_p): Adjust.
4316 (linux_wait_for_process): Rename to ...
4317 (linux_wait_for_lwp): ... this. Adjust.
4318 (linux_wait_for_event): Adjust.
4319 (send_sigstop): Adjust.
4320 (wait_for_sigstop): Adjust.
4321 (stop_all_processes): Rename to ...
4322 (stop_all_lwps): ... this.
4323 (linux_resume_one_process): Rename to ...
4324 (linux_resume_one_lwp): ... this. Adjust.
4325 (linux_set_resume_request, linux_continue_one_thread)
4326 (linux_queue_one_thread, resume_status_pending_p)
4327 (usr_store_inferior_registers, regsets_store_inferior_registers)
4328 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4329 Adjust.
4330 * linux-low.h (get_process): Rename to ...
4331 (get_lwp): ... this. Adjust.
4332 (get_thread_process): Rename to ...
4333 (get_thread_lwp): ... this. Adjust.
4334 (get_process_thread): Rename to ...
4335 (get_lwp_thread): ... this. Adjust.
4336 (struct process_info): Rename to ...
4337 (struct lwp_info): ... this.
4338 (all_processes): Rename to ...
4339 (all_lwps): ... this.
4340 * proc-service.c (ps_lgetregs): Adjust.
4341 * thread-db.c (thread_db_create_event, find_one_thread)
4342 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4343
0b16c5cf
PA
43442009-03-14 Pedro Alves <pedro@codesourcery.com>
4345
4346 * server.c (handle_query): Handle "qAttached".
4347
32de4b9d
NS
43482009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4349
4350 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4351 GPLv3, update license URL.
4352
2aecd87f
DE
43532009-03-01 Doug Evans <dje@google.com>
4354
93efd302 4355 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
4356 (server_h): Add gdb_signals.h.
4357 (signals.o): Update.
4358 * server.h (target_signal_from_host,target_signal_to_host_p)
4359 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4360
86b1f9c5
PM
43612009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4362
4363 * remote-utils.c (getpkt): Also generate remote-debug
4364 information if noack_mode is set.
4365
4aa995e1
PA
43662009-02-06 Pedro Alves <pedro@codesourcery.com>
4367
4368 * server.c (handle_query): Report qXfer:siginfo:read and
4369 qXfer:siginfo:write as supported and handle them.
4370 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4371 * linux-low.c (linux_xfer_siginfo): New.
4372 (linux_target_ops): Set it.
4373
62709adf
PA
43742009-01-26 Pedro Alves <pedro@codesourcery.com>
4375
4376 * server.c (gdbserver_usage): Mention --remote-debug.
4377 (main): Accept '--remote-debug' switch.
4378
aef93bd7
DE
43792009-01-18 Doug Evans <dje@google.com>
4380
4381 * regcache.c (new_register_cache): No need to check result of xcalloc.
4382 * server.c (handle_search_memory): Back out calls to xmalloc,
4383 result is checked and error is returned to user upon failure.
4384 (handle_query): Ditto. Add more checks for result of malloc.
4385 (handle_v_cont): Check result of malloc, report error back to
4386 user upon failure.
4387 (handle_v_run): Ditto. Call freeargv.
4388 * server.h (freeargv): Declare.
4389 * utils.c (freeargv): New fn.
4390
54363045
DE
43912009-01-15 Doug Evans <dje@google.com>
4392
f626972c
DE
4393 * gdbreplay.c (perror_with_name): Make arg const char *.
4394 * server.h (target_signal_to_name): Make return type const char *.
0842e787 4395 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 4396 * utils.c (perror_with_name): Make arg const char *.
54363045 4397
18aae699
PA
43982009-01-14 Pedro Alves <pedro@codesourcery.com>
4399
4400 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4401 when handling a EXIT_PROCESS_DEBUG_EVENT.
4402
ff703abe
JB
44032009-01-06 Joel Brobecker <brobecker@adacore.com>
4404
4405 * gdbreplay.c (gdbreplay_version): Update copyright year.
4406 * server.c (gdbserver_version): Likewise.
4407
f21cc1a2 44082009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
4409
4410 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 4411 (handle_extended_wait): Improve comment.
0e21c1ec 4412
bca929d3
DE
44132008-12-13 Doug Evans <dje@google.com>
4414
4415 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4416 * server.h (ATTR_MALLOC): New macro.
4417 (xmalloc,xcalloc,xstrdup): Declare.
4418 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4419 * inferiors.c: Ditto.
4420 * linux-low.c: Ditto.
4421 * mem-break.c: Ditto.
4422 * regcache.c: Ditto.
4423 * remote-utils.c: Ditto.
4424 * server.c: Ditto.
4425 * target.c: Ditto.
4426 * win32-low.c: Ditto.
4427
97438e3f
DE
44282008-12-12 Doug Evans <dje@google.com>
4429
896c7fbb
DE
4430 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4431 in debugging printf.
4432
97438e3f
DE
4433 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4434
e3b886f8
DE
44352008-12-09 Doug Evans <dje@google.com>
4436
4437 * linux-low.h (struct process_info): Delete member tid, unused.
4438 * thread-db.c (find_one_thread): Update.
4439 (maybe_attach_thread): Update.
4440
07e059b5
VP
44412008-12-02 Pedro Alves <pedro@codesourcery.com>
4442
889bf7c5
PA
4443 * target.h (struct target_ops): Add qxfer_osdata member.
4444 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4445 and dirent.h.
4446 (linux_qxfer_osdata): New functions.
4447 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4448 callback.
4449 * server.c (handle_query): Handle "qXfer:osdata:read:".
4450 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4451 (buffer_xml_printf): New functions.
4452 * server.h (struct buffer): New.
4453 (buffer_grow_str, buffer_grow_str0): New macros.
4454 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4455 (buffer_xml_printf): Declare.
07e059b5 4456
4cab47ab
DE
44572008-11-24 Doug Evans <dje@google.com>
4458
4459 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4460
f142445f
DJ
44612008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4462
4463 * server.c (handle_v_run): Always use the supplied argument list.
4464
d0107bb6 44652008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 4466
d0107bb6
BW
4467 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4468 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 4469
2c4ad781
TJB
44702008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4471
4472 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4473 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4474 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4475 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4476 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4477 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4478 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4479 XML target descriptions.
4480 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4481 when inferior is running on an ISA 2.05 or later processor. Add
4482 special case to return offset for full 64-bit slot of FPSCR when
4483 in 32-bits.
4484
dfb64f85
DJ
44852008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4486
4487 * Makefile.in (SFILES, clean): Added sparc64 files.
4488 (reg-sparc64.o, reg-sparc64.c): New.
4489 * configure.srv (sparc*-*-linux*): New configuration.
4490 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4491 syscall arguments for SPARC.
4492 (regsets_store_inferior_registers): Likewise.
4493 * linux-sparc-low.c: New file.
4494
66b6e1dd
DE
44952008-10-21 Doug Evans <dje@google.com>
4496
4497 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4498 (READLINE_DIR,READLINE_DEP): Delete.
4499 (INTERNAL_CFLAGS): Update.
4500 (LINTFLAGS): Update.
4501
9b710a42
PA
45022008-10-10 Pedro Alves <pedro@codesourcery.com>
4503
4504 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4505 whole argv from the last run, not just argv[0].
4506
5822d809
PA
45072008-09-08 Pedro Alves <pedro@codesourcery.com>
4508
4509 * regcache.c (new_register_cache): Return NULL if the register
4510 cache size isn't known yet.
4511 (free_register_cache): Avoid dereferencing a NULL regcache.
4512
74aac56f
DJ
45132008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4514
4515 * configure.srv: Merge MIPS and MIPS64.
4516
400b20f5
MR
45172008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4518
4519 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4520
677c5bb1
LM
45212008-08-18 Luis Machado <luisgpm@br.ibm.com>
4522
4523 * Makefile.in: Add required vsx dependencies.
4524
4525 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4526 Declare init_registers_powerpc_vsx32l.
4527 Declare init_registers_powerpc_vsx64l.
4528 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4529 (ppc_arch_setup): Check for VSX in hwcap.
4530 (ppc_fill_vsxregset): New function.
4531 (ppc_store_vsxregset): New function.
4532 Add new VSX entry in regset_info target_regsets.
4533
4534 * configure.srv: Add new VSX dependencies.
4535
a6f3e723
SL
45362008-08-12 Pedro Alves <pedro@codesourcery.com>
4537
4538 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4539 (remote_open): Set or clear transport_is_reliable.
4540 (putpkt_binary): Don't expect acks in noack mode.
4541 (getpkt): Don't send ack/nac in noack mode.
4542 * server.c (handle_general_set): Handle QStartNoAckMode.
4543 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4544 qSupported.
4545 (main): Reset noack_mode on every connection.
4546 * server.h (noack_mode): Declare.
4547
a417dc56
RW
45482008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4549
4550 * Makefile.in (GDBREPLAY_OBS): New variable.
4551 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4552
3221518c
UW
45532008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4554 Daniel Jacobowitz <dan@codesourcery.com>
4555
4556 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4557 (usr_store_inferior_registers): Likewise.
4558 (regsets_store_inferior_registers): Likewise.
4559
ec56be1b
PA
45602008-07-31 Rolf Jansen <rj@surtec.com>
4561 Pedro Alves <pedro@codesourcery.com>
4562
4563 * configure.ac: Check for memmem declaration.
4564 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4565 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4566 (disable_packet_qfThreadInfo): Unconditionally compile.
4567 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4568 * configure, config.in: Regenerate.
4569
2fe5e3ff
DE
45702008-07-28 Doug Kwan <dougkwan@google.com>
4571
4572 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4573 (linux_write_memory): Remove declaration of errno.
4574
836acd6d
UW
45752008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4576
4577 * linux-low.c (handle_extended_wait): Do not use "status"
4578 variable uninitialized.
4579
aeba519e
PA
45802008-07-07 Pedro Alves <pedro@codesourcery.com>
4581
4582 * server.c (handle_v_attach): Inhibit reporting dll changes.
4583
db42f210
PA
45842008-06-27 Pedro Alves <pedro@codesourcery.com>
4585
4586 * remote-utils.c (prepare_resume_reply): If requested, don't
4587 output "thread:TID" in the T stop reply.
4588
4589 * server.c (disable_packet_vCont, disable_packet_Tthread)
4590 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4591 (handle_query): If requested, disable support for qC, qfThreadInfo
4592 and qsThreadInfo.
4593 (handle_v_requests): If requested, disable support for vCont.
4594 (gdbserver_show_disableable): New.
4595 (main): Handle --disable-packet and --disable-packet=LIST.
4596
4597 * server.h (disable_packet_vCont, disable_packet_Tthread)
4598 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4599
8e4c5421
CD
46002008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4601
4602 * server.c (gdbserver_usage): Mention --version.
4603
6e23a804
DJ
46042008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4605
4606 * Makefile.in (gdbreplay.o): New rule.
4607
90aa6a40
JM
46082008-06-06 Joseph Myers <joseph@codesourcery.com>
4609
4610 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4611 message, not gdbserver.
4612
c16158bc 46132008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
4614 Nathan Sidwell <nathan@codesourcery.com>
4615 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
4616
4617 * acinclude.m4: Include ../../config/acx.m4.
4618 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4619 * configure, config.in: Regenerate.
4620 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4621 * server.c (gdbserver_version): Print PKGVERSION.
4622 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4623 (main): Adjust gdbserver_usage calls.
4624 * gdbreplay.c (version, host_name): Add declarations.
4625 (gdbreplay_version, gdbreplay_usage): New.
4626 (main): Accept --version and --help options.
4627
aeb75bf5
DJ
46282008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4629
4630 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4631 (arm_breakpoint_at): Handle Thumb.
4632 (the_low_target): Add comment.
4633
76b233dd
UW
46342008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4635
4636 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4637
08388c79
DE
46382008-05-09 Doug Evans <dje@google.com>
4639
a3c83fae
DE
4640 * server.h (decode_search_memory_packet): Declare.
4641 * remote-utils.c (decode_search_memory_packet): New fn.
4642 * server.c (handle_search_memory_1): New fn.
08388c79
DE
4643 (handle_search_memory): New fn.
4644 (handle_query): Process qSearch:memory packets.
4645
bb9c3d36
UW
46462008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4647
4648 * regcache.c (registers_length): Remove.
4649 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4650 full register packet.
4651 * regcache.h (registers_length): Remove prototype.
4652 * server.h (PBUFSIZ): Define to 16384.
4653
7284e1be
UW
46542008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4655
4656 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4657 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4658 powerpc-64l.o, and powerpc-altivec64l.o.
4659 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4660 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4661 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4662 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4663 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4664 to srv_xmlfiles.
4665
4666 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4667 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4668 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4669 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4670 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4671 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4672 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4673 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4674 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4675 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4676 (clean): Update.
4677
4678 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4679 (init_registers_powerpc_32l): ... this new prototype.
4680 (init_registers_powerpc_32): Remove, replace by ...
4681 (init_registers_powerpc_altivec32l): ... this new prototype.
4682 (init_registers_powerpc_e500): Remove, replace by ...
4683 (init_registers_powerpc_e500l): ... this new prototype.
4684 (init_registers_ppc64): Remove, replace by ...
4685 (init_registers_powerpc_64l): ... this new prototype.
4686 (init_registers_powerpc_64): Remove, replace by ...
4687 (init_registers_powerpc_altivec64l): ... this new prototype.
4688 (ppc_num_regs): Set to 73.
4689 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4690 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4691 (ppc_cannot_store_register): Handle orig_r3 and trap.
4692 (ppc_arch_setup): Update init_registers_... calls.
4693 (ppc_fill_gregset): Handle orig_r3 and trap.
4694
4695 * inferiors.c (clear_inferiors): Reset current_inferior.
4696
fdc59709
PB
46972008-04-23 Paolo Bonzini <bonzini@gnu.org>
4698
889bf7c5
PA
4699 * acinclude.m4: Add override.m4.
4700 * configure: Regenerate.
fdc59709 4701
c9b2f845
UW
47022008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4703
4704 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4705 initial call to init_register_ppc64.
4706
550512b8
UW
47072008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4708
4709 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4710 powerpc*-*-linux* case.
4711 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4712
b6430ec3
UW
47132008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4714
4715 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 4716 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
4717 from reg_xmlfiles.
4718 * linux-ppc-low.c: Include <elf.h>.
4719 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4720 (ppc_hwcap): New global variable.
4721 (ppc_regmap): Remove __SPE__ #ifdef sections.
4722 (ppc_regmap_e500): New global variable.
4723 (ppc_cannot_store_register): Update __SPE__ special case.
4724 (ppc_get_hwcap): New function.
4725 (ppc_arch_setup): Use it to determine whether inferior supports
4726 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4727 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4728 Do not access registers if target does not support AltiVec.
4729 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4730 Do not access registers if target does not support SPE.
4731 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4732
52fa2412
UW
47332008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4734
4735 * linux-low.c (disabled_regsets, num_regsets): New.
4736 (use_regsets_p): Delete.
4737 (linux_wait_for_process): Clear disabled_regsets.
4738 (regsets_fetch_inferior_registers): Check and set it.
4739 (regsets_store_inferior_registers): Likewise.
4740 (linux_fetch_registers, linux_store_registers): Do not use
4741 use_regsets_p.
4742 (initialize_low): Allocate disabled_regsets.
4743
e28b3332
DJ
47442008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4745
4746 * Makefile.in (LIBOBJS): New.
4747 (OBS): Use LIBOBJS.
4748 (memmem.o): New rule.
4749 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4750 * configure: Regenerated.
4751
4536995d
UW
47522008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4753
4754 * server.c (handle_query): Never return "unsupported" for
4755 qXfer:features:read queries.
4756
221c031f
UW
47572008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4758
4759 * server.c (get_features_xml): Fix inverted condition.
4760 (handle_query): Always support qXfer:feature:read.
4761
ccd213ac
DJ
47622008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4763
4764 * server.c (wrapper_argv): New.
4765 (start_inferior): Handle wrapper_argv. If set, expect an extra
4766 trap.
4767 (gdbserver_usage): Document --wrapper.
4768 (main): Parse --wrapper.
4769
6fe305f7
UW
47702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4771
4772 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4773 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4774 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4775 (ppc_set_pc): Likewise.
4776 (ppc_arch_setup): New function.
4777 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4778 of collect_register.
889bf7c5 4779 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 4780
5b0a002e
UW
47812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4782
4783 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4784 instead of linux-ppc64-low.o.
4785 * linux-ppc64-low.c: Remove file.
4786 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4787 (linux-ppc64-low.o): Remove rule.
4788
4789 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4790 (init_registers_powerpc_64): Likewise.
4791 (ppc_regmap): Conditionally define depending on __powerpc64__.
4792 (ppc_cannot_store_register): Do not special-case "fpscr" when
4793 compiled on __powerpc64__.
4794 (ppc_collect_ptrace_register): New function.
4795 (ppc_supply_ptrace_register): New function.
4796 (ppc_breakpoint): Change type to "unsigned int".
4797 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4798 (the_low_target): Conditionally provide initializers for the
889bf7c5 4799 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
4800 collect_ptrace_register and supply_ptrace_register members.
4801
9b4b61c8
UW
48022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4803
4804 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4805 * server.c (gdbserver_xmltarget): Define.
4806 (get_features_xml): Use it to replace "target.xml" and arch_string.
4807
4808 * configure.srv: Remove srv_xmltarget. Add XML files that were
4809 mentioned there to srv_xmlfiles instead. Remove conditional tests
4810 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4811 srv_xmlfiles and srv_regobj to include all possible choices.
4812 * configure.ac (srv_xmltarget): Remove.
4813 (srv_xmlfiles): Do not add "target.xml".
4814 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4815 checks for supplementary target information.
4816 * configure: Regenerate.
4817 * Makefile.in (XML_TARGET): Remove.
4818 (target.xml): Remove rule.
4819 (clean): Do not clean up target.xml.
4820 (.PRECIOUS): Do not mention target.xml.
4821
4822 * target.h (struct target_ops): Remove arch_string member.
4823 * linux-low.c (linux_arch_string): Remove.
4824 (linux_target_ops): Remove arch_string initializer.
4825 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4826 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4827 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4828 * spu-low.c (spu_arch_string): Remove.
4829 (spu_target_ops): Remove arch_string initializer.
4830 * win32-low.c (win32_arch_string): Remove.
4831 (win32_target_ops): Remove arch_string initializer.
4832 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4833 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4834 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4835
ee1a7ae4
UW
48362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4837
4838 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4839 by collect_ptrace_register and supply_ptrace_register hooks.
4840 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4841 instead of checking for the_low_target.left_pad_xfer.
4842 (usr_store_inferior_registers): Use collect_ptrace_register callback
4843 instead of checking for the_low_target.left_pad_xfer.
4844
4845 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4846 (s390_supply_ptrace_register): Likewise.
4847 (s390_fill_gregset): Call s390_collect_ptrace_register.
4848 (the_low_target): Update.
4849
4850 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4851 (ppc_supply_ptrace_register): Likewise.
4852 (the_low_target): Update.
4853
4854 * linux-i386-low.c (the_low_target): Update.
4855 * linux-x86-64-low.c (the_low_target): Update.
4856
d61ddec4
UW
48572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4858
4859 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4860 reg-s390.o and reg-s390x.o.
4861
4862 * linux-low.c (new_inferior): New global variable.
4863 (linux_create_inferior, linux_attach): Set it.
4864 (linux_wait_for_process): Call the_low_target.arch_setup after the
4865 target has stopped for the first time.
4866 (initialize_low): Do not call the_low_target.arch_setup.
4867
4868 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4869 (s390_set_pc): Likewise.
4870 (s390_arch_setup): New function.
4871 (the_low_target): Use s390_arch_setup as arch_setup routine.
4872
4873 * regcache.c (realloc_register_cache): New function.
4874 (set_register_cache): Call it for each existing regcache.
4875
d05b4ac3
UW
48762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4877
4878 * server.h (init_registers): Remove prototype.
4879
4880 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4881 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4882 instead of init_registers ().
4883 * linux-arm-low.c (init_registers_arm): Add prototype.
4884 (init_registers_arm_with_iwmmxt): Likewise.
4885 (the_low_target): Add initializer for arch_setup field.
4886 * linux-cris-low.c (init_registers_cris): Add prototype.
4887 (the_low_target): Add initializer for arch_setup field.
4888 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4889 (the_low_target): Add initializer for arch_setup field.
4890 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4891 (the_low_target): Add initializer for arch_setup field.
4892 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4893 (the_low_target): Add initializer for arch_setup field.
4894 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4895 (the_low_target): Add initializer for arch_setup field.
4896 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4897 (the_low_target): Add initializer for arch_setup field.
4898 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4899 (init_registers_mips64_linux): Likewise.
4900 (the_low_target): Add initializer for arch_setup field.
4901 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4902 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4903 (the_low_target): Add initializer for arch_setup field.
4904 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4905 (init_registers_powerpc_64): Likewise.
4906 (the_low_target): Add initializer for arch_setup field.
4907 * linux-s390-low.c (init_registers_s390): Add prototype.
4908 (init_registers_s390x): Likewise.
4909 (the_low_target): Add initializer for arch_setup field.
4910 * linux-sh-low.c (init_registers_sh): Add prototype.
4911 (the_low_target): Add initializer for arch_setup field.
4912 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4913 (the_low_target): Add initializer for arch_setup field.
4914 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4915 (the_low_target): Add initializer for arch_setup field.
4916
4917 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4918 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4919 instead of init_registers ().
4920 * win32-arm-low.c (init_registers_arm): Add prototype.
4921 (the_low_target): Add initializer for arch_setup field.
4922 * win32-i386-low.c (init_registers_i386): Add prototype.
4923 (the_low_target): Add initializer for arch_setup field.
4924
4925 * spu-low.c (init_registers_spu): Add prototype.
4926 (initialize_low): Call initialie_registers_spu () instead of
4927 initialize_registers ().
4928
fd96d250
PA
49292008-02-19 Pedro Alves <pedro@codesourcery.com>
4930
4931 * server.c (handle_v_requests): When handling the vRun and vAttach
4932 packets, if already debugging a process, don't kill it. Return an
4933 error instead.
4934
d41b6bb4
DJ
49352008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4936
4937 * server.c (handle_query): Correct length check.
4938
5ac588cf
PA
49392008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4940
4941 * win32-low.c (do_initial_child_stuff): Add process handle
4942 parameter. Set current_process_handle and current_process_id from the
4943 parameters. Clear globals.
4944 (win32_create_inferior): Don't set current_process_handle and
4945 current_process_id here. Instead pass them on the call to
4946 do_initial_child_stuff.
4947 (win32_attach): Likewise.
4948 (win32_clear_inferiors): New.
4949 (win32_kill): Don't close the current process handle or the
4950 current thread handle here. Instead call win32_clear_inferiors.
4951 (win32_detach): Don't open a new handle to the process. Call
4952 win32_clear_inferiors.
4953 (win32_join): Don't rely on current_process_handle; open a new
4954 handle using the process id.
4955 (win32_wait): Call win32_clear_inferiors when the inferior process
4956 has exited.
4957
ecd7ecbc
DJ
49582008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4959
4960 * server.c (monitor_show_help): Add "exit".
4961
1525d545
MG
49622008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4963
ecd7ecbc 4964 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
4965 (clean): Add reg-xtensa.c.
4966 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
4967 * configure.srv (xtensa*-*-linux*) New target.
4968 * linux-xtensa-low.c: New.
4969 * xtensa-xtregs.c: New.
1525d545 4970
59a016f0
PA
49712008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4972
4973 * hostio.c: Don't include errno.h.
4974 (errno_to_fileio_errno): Move to hostio-errno.
4975 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4976 error number outputting to the target->hostio_last_error callback.
4977 (hostio_packet_error): Use FILEIO_EINVAL directly.
4978 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4979 calls to hostio_error.
4980 * hostio-errno.c: New.
4981 * server.h (hostio_last_error_from_errno): Declare.
4982 * target.h (target_ops): Add hostio_last_error member.
4983 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4984 as hostio_last_error handler.
889bf7c5 4985 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
4986 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4987 (wince_hostio_last_error): New functions.
4988 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4989 as hostio_last_error handler.
4990 (win32_target_ops) [!_WIN32_WCE]: Register
4991 hostio_last_error_from_errno as hostio_last_error handler.
4992 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4993 (hostio-errno.o): New rule.
4994 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4995 * configure.srv (srv_hostio_err_objs): New variable. Default to
4996 hostio-errno.o.
4997 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4998 * configure: Regenerate.
4999
2d717e4f
DJ
50002008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5001
5002 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5003 (linux_kill, linux_detach): Clean up the process list.
5004 * remote-utils.c (remote_open): Improve port number parsing.
5005 (putpkt_binary, input_interrupt): Only send interrupts if the target
5006 is running.
5007 * server.c (extended_protocol): Make static.
5008 (attached): Define earlier.
5009 (exit_requested, response_needed, program_argv): New variables.
5010 (target_running): New.
5011 (start_inferior): Clear attached here.
5012 (attach_inferior): Set attached here.
5013 (require_running): Define.
5014 (handle_query): Use require_running and target_running. Implement
5015 "monitor exit".
5016 (handle_v_attach, handle_v_run): New.
5017 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5018 (gdbserver_usage): Update.
5019 (main): Redo argument parsing. Handle --debug and --multi. Handle
5020 --attach along with other options or after the port. Save
5021 program_argv. Support no initial program. Resynchronize
5022 communication with GDB after an error. Handle "monitor exit".
5023 Use require_running and target_running. Always allow the extended
5024 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5025 restart in extended mode.
5026 * README: Refer to the GDB manual. Update --attach usage.
5027
7407e2de
AS
50282007-12-20 Andreas Schwab <schwab@suse.de>
5029
5030 * linux-low.c (STACK_SIZE): Define.
5031 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5032 (linux_test_for_tracefork): Likewise.
5033
b65d95c5
DJ
50342007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5035
5036 * linux-low.c (linux_wait_for_event): Update messages. Do not
5037 reinsert auto-delete breakpoints.
5038 * mem-break.c (struct breakpoint): Change return type of handler to
5039 int.
5040 (set_breakpoint_at): Update handler type.
5041 (reinsert_breakpoint_handler): Return 1 instead of calling
5042 delete_breakpoint.
5043 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5044 setting a new one.
5045 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5046 * mem-break.h (set_breakpoint_at): Update handler type.
5047 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5048 * win32-low.c (auto_delete_breakpoint): New.
5049 (get_child_debug_event): Use it.
5050
4e799345
DJ
50512007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5052
5053 * configure.ac: Check for pread and pwrite.
5054 * hostio.c (handle_pread): Fall back to lseek and read.
5055 (handle_pwrite): Fall back to lseek and write.
5056 * config.in, configure: Regenerated.
5057
27524b67
DJ
50582007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5059
5060 * server.c (myresume): Add own_buf argument.
5061 (main): Update calls.
5062
a20d5e98
DJ
50632007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5064
5065 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5066 * remote-utils.c (remote_open): Do not call disable_async_io.
5067 (block_async_io): Delete.
5068 (unblock_async_io): Make static.
5069 (initialize_async_io): New.
5070 * server.c (handle_v_cont): Handle async I/O here.
5071 (myresume): Likewise. Move other common resume tasks here...
5072 (main): ... from here. Call initialize_async_io. Disable async
5073 I/O before the main loop.
5074 * server.h (initialize_async_io): Declare.
5075 (block_async_io, unblock_async_io): Delete prototypes.
5076 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5077
b79d787e
DJ
50782007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5079
5080 * remote-utils.c (readchar): Allow binary data in received messages.
5081
d97903b2
PA
50822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5083
5084 * win32-low.c (attaching): New global.
5085 (win32_create_inferior): Clear the `attaching' global.
5086 (win32_attach): Set the `attaching' global.
5087 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5088 attaching. Only set a breakpoint at the entry point if not
5089 attaching.
5090
311de423
PA
50912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5092
5093 * server.c (main): Don't report dll events on the initial
5094 connection on attaches.
5095
6c2d16d2
PA
50962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5097
5098 * server.c (main): Relax numerical bases supported for the pid of
5099 the --attach command line argument.
5100
5ca906e6
PA
51012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5102
5103 * win32-low.c (win32_attach): Call OpenProcess before
5104 DebugActiveProcess, not after. Add last error output to error
5105 call.
5106
9c6c8194
PA
51072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5108
5109 * win32-low.c (win32_get_thread_context)
5110 (win32_set_thread_context): New functions.
5111 (thread_rec): Use win32_get_thread_context.
5112 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5113 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5114 field.
5115
4d5d1aaa
PA
51162007-12-03 Leo Zayas
5117 Pedro Alves <pedro_alves@portugalmail.pt>
5118
5119 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5120 global variables.
5121 (child_add_thread): Minor cleanup.
5122 (child_continue): Resume artificially suspended threads before
5123 calling ContinueDebugEvent.
5124 (suspend_one_thread): New.
5125 (fake_breakpoint_event): New.
5126 (get_child_debug_event): Change return type to int. Check here if
5127 gdb sent an interrupt request. If a soft interrupt was requested,
5128 fake a breakpoint event. Return 0 if there is no event to handle,
5129 and 1 otherwise.
5130 (win32_wait): Don't check here if gdb sent an interrupt request.
5131 Ensure there is a valid event to handle.
5132 (win32_request_interrupt): Add soft interruption method as last
5133 resort.
5134
c436e841
PA
51352007-12-03 Leo Zayas
5136 Pedro Alves <pedro_alves@portugalmail.pt>
5137
5138 * win32-low.h (win32_thread_info): Add descriptions to the
5139 structure members. Replace `suspend_count' counter by a
5140 `suspended' flag.
5141 * win32-low.c (thread_rec): Update condition of when to get the
5142 context from the inferior. Rely on ContextFlags being set if it
5143 has already been retrieved. Only suspend the inferior thread if
5144 we haven't already. Warn if that fails.
5145 (continue_one_thread): s/suspend_count/suspended/. Only call
5146 ResumeThread once. Warn if that fails.
5147
e7b5fa67
PA
51482007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5149
5150 * win32-low.c (win32_wait): Don't read from the inferior when it
5151 has already exited.
5152
a385171d
PA
51532007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5154
5155 * Makefile.in (win32_low_h): New variable.
5156 (win32-low.o): Add dependency on $(win32_low_h).
5157 (win32-arm-low.o, win32-i386-low.o): New rules.
5158
f80c84b3
DJ
51592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5160
5161 * hostio.c: Correct copyright year.
5162
a6b151f1
DJ
51632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5164
5165 * Makefile.in (OBS): Add hostio.o.
5166 (hostio.o): New rule.
5167 * server.h (handle_vFile): Declare.
5168 * hostio.c: New file.
5169 * server.c (handle_v_requests): Take packet_len and new_packet_len
5170 for binary packets. Call handle_vFile.
5171 (main): Update call to handle_v_requests.
5172
f9387fc3
DJ
51732007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5174
5175 * linux-low.c: Include <sched.h>.
5176
51c2684e
DJ
51772007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5178
5179 * linux-low.c (linux_tracefork_grandchild): New.
5180 (linux_tracefork_child): Use clone.
5181 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5182
75f83163
JB
51832007-10-31 Joel Brobecker <brobecker@adacore.com>
5184
5185 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5186
da5898ce
DJ
51872007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5188
5189 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5190
24a09b5f
DJ
51912007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5192
5193 * inferiors.c (change_inferior_id): Delete.
5194 (add_pid_to_list, pull_pid_from_list): New.
5195 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5196 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5197 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5198 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5199 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5200 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5201 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5202 (using_threads): Always set to 1.
5203 (handle_extended_wait): New.
5204 (add_process): Do not set TID.
5205 (linux_create_inferior): Set must_set_ptrace_flags.
5206 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5207 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5208 (linux_thread_alive): Rename TID argument to LWPID.
5209 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5210 (linux_wait_for_event): Do not use TID or check using_threads. Update
5211 call to dead_thread_notify. Call handle_extended_wait.
5212 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5213 (send_sigstop): Delete sigstop_sent.
5214 (wait_for_sigstop): Avoid TID.
5215 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5216 (linux_test_for_tracefork): New.
5217 (linux_lookup_signals): Use thread_db_active and
5218 linux_supports_tracefork_flag.
5219 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5220 * linux-low.h (get_process_thread): Avoid TID.
5221 (struct process_ifo): Move thread_known and tid to the end. Remove
5222 sigstop_sent.
5223 (linux_attach_lwp, thread_db_init): Update prototypes.
5224 * server.h (change_inferior_id): Delete prototype.
5225 (add_pid_to_list, pull_pid_from_list): New prototypes.
5226 * thread-db.c (thread_db_use_events): New.
5227 (find_first_thread): Rename to...
5228 (find_one_thread): ...this. Update callers and messages. Do not
5229 call fatal. Check thread_db_use_events. Do not call
5230 change_inferior_id or new_thread_notify.
5231 (maybe_attach_thread): Update. Do not call new_thread_notify.
5232 (thread_db_init): Set thread_db_use_events. Check use_events.
5233 * utils.c (fatal, warning): Correct message prefix.
5234
30ed0a8f
DJ
52352007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5236
5237 * Makefile.in (clean): Remove new files.
5238 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5239 (powerpc-64.o, powerpc-64.c): New rules.
5240 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5241 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5242 with SPE.
5243 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5244 SPE targets.
5245 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5246 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5247 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5248 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5249 (target_regsets): Add AltiVec and SPE register sets.
5250 * configure.ac: Check for AltiVec and SPE.
5251 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5252 (ppc_fill_vrregset, ppc_store_vrregset): New.
5253 (target_regsets): Add AltiVec register set.
5254 * configure: Regenerated.
5255
fd462a61
DJ
52562007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5257
5258 * linux-low.c (O_LARGEFILE): Define.
5259 (linux_read_memory): Use /proc/PID/mem.
5260 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5261 * configure, config.in: Regenerated.
5262
69f223ed
DJ
52632007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5264
5265 * linux-low.c (linux_wait_for_event): Do not pass signals while
5266 single-stepping.
5267
aec18585
PA
52682007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5269
5270 * win32-low.c (create_process): New.
5271 (win32_create_inferior): Use create_process instead of
5272 CreateProcess. If create_process failed retry appending an ".exe"
5273 suffix. Store the GetLastError result immediatelly after
5274 create_process calls and use it on the call to error.
5275
34d86ddd
PA
52762007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5277
5278 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5279
5a0e3bd0
JB
52802007-08-23 Joel Brobecker <brobecker@adacore.com>
5281
5282 * configure.ac: Switch license to GPLv3.
5283
f88c79e6
MS
52842007-08-01 Michael Snyder <msnyder@access-company.com>
5285
5286 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5287
6b3d9b83
PA
52882007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5289
5290 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5291 typedef.
5292 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5293 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5294 CloseToolhelp32Snapshot.
5295 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5296 CloseToolhelp32Snapshot.
5297
c588c53c
MS
52982007-07-27 Michael Snyder <michael.snyder@access-company.com>
5299
5300 * server.c (main): Check for inferior exit before main loop.
5301
aa0403d9
PA
53022007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5303
5304 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5305 instead of on tmp_desc.
5306
255e7678
DJ
53072007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5308 Daniel Jacobowitz <dan@codesourcery.com>
5309
5310 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5311 (add_thread): Minor cleanups.
5312 (clear_inferiors): Move lower in the file. Clear the DLL
5313 list.
5314 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5315 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5316 (xml_escape_text): New.
5317 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5318 for qSupported.
5319 (handle_v_cont): Report errors.
5320 (gdbserver_version): Update.
5321 (main): Correct size of own_buf. Do not report initial DLL events.
5322 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5323 (unloaded_dll, xml_escape_text): New.
5324 * win32-low.c (enum target_waitkind): Update comments.
5325 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5326 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5327 (win32_EnumProcessModules, win32_GetModuleInformation)
5328 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5329 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5330 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5331 (win32_Module32First, win32_Module32Next, load_toolhelp)
5332 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5333 (get_child_debug_event): Handle DLL events.
5334 (win32_wait): Likewise.
5335
0d37add9
DJ
53362007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5337
5338 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5339 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5340
45e2715e
PA
53412007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5342
5343 * win32-low.c (handle_output_debug_string): Ignore event if not
5344 waiting.
5345
c5674cf1
PA
53462007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5347
5348 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5349
2bbe3cc1
DJ
53502007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5351
5352 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5353
ae13219e
DJ
53542007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5355
5356 * inferiors.c (change_inferior_id): Add comment.
5357 * linux-low.c (check_removed_breakpoint): Add an early
5358 prototype. Improve debug output.
5359 (linux_attach): Doc update.
5360 (linux_detach_one_process, linux_detach): Clean up before releasing
5361 each process.
5362 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5363 * linux-low.h (struct process_info): Doc improvement.
5364 * mem-break.c (delete_all_breakpoints): New.
5365 * mem-break.h (delete_all_breakpoints): New prototype.
5366 * thread-db.c (find_first_thread): New.
5367 (thread_db_create_event): Call it instead of
5368 thread_db_find_new_threads. Clean up unused variables.
5369 (maybe_attach_thread): Remove first thread handling.
5370 (thread_db_find_new_threads): Use find_first_thread.
5371 (thread_db_get_tls_address): Likewise.
5372
4105de34
DJ
53732007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5374
5375 * thread-db.c (thread_db_find_new_threads): Add prototype.
5376 (thread_db_create_event): Check for the main thread before adding
5377 a new thread.
5378 (maybe_attach_thread): Only enable event reporting if TID == 0.
5379 (thread_db_get_tls_address): Check for new threads.
5380
2b876972
DJ
53812007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5382
5383 * linux-low.c (linux_create_inferior): Try execv before execvp.
5384 * spu-low.c (spu_create_inferior): Likewise.
5385
7a245884
DJ
53862007-06-13 Mike Frysinger <vapier@gentoo.org>
5387
5388 * linux-low.c (linux_create_inferior): Change execv to execvp.
5389 * spu-low.c (spu_create_inferior): Likewies.
5390
117ce543
DJ
53912007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5392
5393 * Makefile.in (clean): Clean new files instead of deleted ones.
5394 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5395 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5396 rules.
5397 * configure.srv: Specify XML files and new regformats for MIPS and
5398 MIPS64 GNU/Linux.
5399 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5400 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5401 an entry for the restart register.
5402 (mips_cannot_fetch_register, mips_cannot_store_register)
5403 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5404 register names to match the XML descriptions.
5405 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5406 restart register instead of $0.
5407
0e7f50da
UW
54082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5409 Markus Deuling <deuling@de.ibm.com>
5410
5411 * remote-utils.c (decode_xfer_write): New function.
5412 * server.h (decode_xfer_write): Add prototype.
5413 * server.c (handle_query): Add PACKET_LEN argument. Support
5414 qXfer:spu:read and qXfer:spu:write packets.
5415 (main): Pass packet_len to handle_query.
5416 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5417 * target.h (target_ops): Add qxfer_spu.
5418
374c1d38
UW
54192007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5420
5421 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5422 accessing non-seekable spufs files.
5423
bb63802a
UW
54242007-05-16 Markus Deuling <deuling@de.ibm.com>
5425
889bf7c5 5426 * server.c (handle_query): Add reply for qC packet.
bb63802a 5427
7390519e
PA
54282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5429 Leo Zayas <lerele@champenstudios@com>
5430
5431 * server.h (check_remote_input_interrupt_request): New function.
5432 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5433 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5434 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5435 (check_remote_input_interrupt_request): New function.
5436 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 5437 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
5438 winapi_GenerateConsoleCtrlEvent): New typedefs.
5439 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5440 to 250 ms.
5441 (win32_wait): Check for remote interrupt request
5442 with check_remote_input_interrupt_request.
5443 (win32_request_interrupt): New function.
5444 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5445
34b34921
PA
54462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5447
5448 * win32-low.c (debug_registers_changed,
5449 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5450 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5451 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5452 (thread_rec): Get context using the low target.
5453 (child_add_thread): Call thread_added on the low target,
5454 which does the same thing.
5455 (regptr): Delete.
5456 (do_initial_child_stuff): Remove debug registers references.
5457 Set context using the low target. Resume threads after
5458 setting the contexts.
5459 (child_continue): Remove dead variable. Remove debug
5460 registers references.
5461 (child_fetch_inferior_registers): Go through the low target.
5462 (do_child_store_inferior_registers): Remove.
5463 (child_store_inferior_registers): Go through the low target.
5464 (win32_resume): Remove debug registers references.
5465 Set context using the low target.
5466 (handle_exception): Change return type to void. Don't record
5467 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5468 first chance exception.
889bf7c5 5469 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
5470 goto loop. Always return after waiting for debug event.
5471 (win32_wait): Convert to switch statement. Handle spurious
5472 events.
5473
5474 * win32-i386-low.c (debug_registers_changed,
5475 debug_registers_used): New.
5476 (initial_stuff): Rename to ...
5477 (i386_initial_stuff): ... this. Clear debug registers
5478 state variables.
5479 (store_debug_registers): Delete.
5480 (i386_get_thread_context): New.
5481 (load_debug_registers): Delete.
5482 (i386_set_thread_context): New.
5483 (i386_thread_added): New.
5484 (single_step): Rename to ...
5485 (i386_single_step): ... this.
5486 (do_fetch_inferior_registers): Rename to ...
5487 (i386_fetch_inferior_register): ... this.
5488 (i386_store_inferior_register): New.
5489 (the_low_target): Adapt to new interface.
5490
5491 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5492 (arm_get_thread_context): New.
5493 (arm_set_thread_context): New.
5494 (regptr): New.
5495 (do_fetch_inferior_registers): Rename to ...
5496 (arm_fetch_inferior_register): ... this.
5497 (arm_store_inferior_register): New.
5498 (arm_wince_breakpoint): Reimplement as unsigned long.
5499 (arm_wince_breakpoint_len): Define.
5500 (the_low_target): Adapt to new interface.
5501
5502 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5503 load_debug_registers. Add get_thread_context, set_thread_context,
5504 thread_added and store_inferior_register. Rename
5505 fetch_inferior_registers to fetch_inferior_register.
5506 (regptr): Remove declaration.
5507
dd6953e1
PA
55082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5509
5510 * linux-low.c (linux_detach): Change return type to int. Return 0.
5511 * spu-low.c (spu_detach): Likewise.
5512
444d6139
PA
55132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5514
5515 * target.h (target_ops): Change return type of detach to int.
5516 Add join.
5517 (join_inferior): New.
5518 * server.c (main): Don't skip detach support on mingw32.
5519 If the inferior doesn't support detaching return error.
5520 Call join_inferior instead of using waitpid.
5521 * linux-low.c (linux_join): New.
5522 (linux_target_op): Add linux_join.
5523 * spu-low.c (spu_join): New.
5524 (spu_target_ops): Add spu_join.
5525 * win32-low.c (win32_detach): Adapt to new interface.
5526 Reopen current_process_handle before detaching. Issue a child
5527 resume before detaching.
5528 (win32_join): New.
5529 (win32_target_op): Add win32_join.
5530
1d5315fe
PA
55312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5532
5533 * win32-low.c (win32-attach): Fix return value.
5534 * target.h (target_ops): Describe ATTACH return values.
5535
bf914831
PA
55362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5537
5538 * win32-low.c (GETPROCADDRESS): Define.
5539 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5540 (winapi_DebugSetProcessKillOnExit): Likewise.
5541 (win32_create_inferior): Force usage of ansi CreateProcessA.
5542 (win32_attach): Use GETPROCADDRESS.
5543 (win32_detach): Likewise.
5544
f72f3e60
PA
55452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5546
5547 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5548
ed50f18f
PA
55492007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5550
5551 * win32-low.c: Commit leftover changes from 2007-03-29.
5552
0c2ead7e
DJ
55532007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5554
5555 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5556 fields short instead of int. Add explicit padding.
5557 (i387_cache_to_fsave): Remove unnecessary casts.
5558 (i387_fsave_to_cache): Doc fix.
5559 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5560
73725ff3
DJ
55612007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5562
5563 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5564 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5565
d99f33d8
PA
55662007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5567
5568 * configure.srv (arm*-*-mingw32ce*): Move near the other
5569 arm targets.
5570
68070c10
PA
55712007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5572
2482afc6 5573 * configure.ac: Add errno checking.
68070c10
PA
5574 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5575 sys/file.h and malloc.h.
5576 (AC_CHECK_DECLS): Add perror.
5577 (srv_mingwce): Handle.
2482afc6 5578 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
5579 win32-i386-low.o to srv_tgtobj.
5580 (i[34567]86-*-mingw*): Likewise.
5581 (arm*-*-mingw32ce*): Add case.
5582 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5583 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5584 [__MINGW32CE__] (strerror): New function.
5585 [__MINGW32CE__] (errno): Define to GetLastError.
5586 [__MINGW32CE__] (COUNTOF): New macro.
5587 (remote_open): Remove extra close call.
5588 * mem-break.c (delete_breakpoint_at): New function.
5589 * mem-break.h (delete_breakpoint_at): Declare.
5590 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5591 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5592 [USE_WIN32API] (read, write): Add char* casts.
5593 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5594 * server.h: Include wincecompat.h on Windows CE.
5595 [HAVE_ERRNO_H]: Check.
5596 (perror): Declare if not declared.
5597 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5598 (perror_with_name): Remove errno declaration.
5599 * wincecompat.h: New.
5600 * wincecompat.c: New.
5601 * win32-low.h: New.
5602 * win32-arm-low.c: New.
5603 * win32-i386-low.c: New.
5604 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5605 (OUTMSG2): Make it safe.
5606 (_T): New macro.
5607 (COUNTOF): New macro.
5608 (NUM_REGS): Get it from the low target.
5609 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5610 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5611 (thread_rec): Let low target handle debug registers.
5612 (child_add_thread): Likewise.
5613 (child_init_thread_list): Likewise.
5614 (continue_one_thread): Likewise.
5615 (regptr): New.
5616 (do_child_fetch_inferior_registers): Move to ...
5617 * win32-i386-low.c: ... here, and rename to ...
5618 (do_fetch_inferior_registers): ... this.
889bf7c5 5619 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
5620 Go through the low target.
5621 (do_child_store_inferior_registers): Use regptr.
5622 (strwinerror): New function.
5623 (win32_create_inferior): Handle Windows CE.
5624 Use strwinerror instead of strerror on Windows error
5625 codes. Add program to the error output.
5626 Don't close the main thread handle on Windows CE.
5627 (win32_attach): Use coredll.dll on Windows CE.
5628 (win32_kill): Close current process and current
5629 thread handles.
5630 (win32_detach): Use coredll.dll on Windows CE.
5631 (win32_resume): Let low target handle debug registers, and
5632 step request.
5633 (handle_exception): Add/Remove initial breakpoint. Avoid
5634 non-existant WSTOPSIG on Windows CE.
5635 (win32_read_inferior_memory): Cast to remove warning.
5636 (win32_arch_string): Go through the low target.
5637 (initialize_low): Call set_breakpoint_data with the low
5638 target's breakpoint.
5639 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5640 FOP_REGNUM, mappings): Move to ...
5641 * win32-i386-low.c: ... here.
5642 * win32-low.c (win32_thread_info): Move to ...
5643 * win32-low.h: ... here.
5644 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5645 win32-arm-low.c and wincecompat.c.
5646 (all:): Add $EXEEXT.
5647 (install-only:): Likewise.
5648 (gdbserver:): Likewise.
5649 (gdbreplay:): Likewise.
5650 * config.in: Regenerate.
5651 * configure: Regenerate.
5652
41093d81
PA
56532007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5654
5655 * win32-low.c: Rename typedef thread_info to
5656 win32_thread_info throughout.
5657
544afa54
PA
56582007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5659
5660 * win32-i386-low.c: Rename to ...
5661 * win32-low.c: ... this.
5662 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5663 * Makefile.in: Likewise.
5664
bce7165d
PA
56652007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5666
5667 * remote-utils.c (monitor_output): Constify msg parameter.
5668 * server.h (monitor_output): Likewise.
5669 * win32-i386-low.c (handle_output_debug_string): New.
5670 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5671 handle_output_debug_string.
5672 (get_child_debug_event): Likewise.
5673
506c7aa0
DJ
56742007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5675
5676 * server.c (main): Correct strtoul check.
5677
42c81e2a
DJ
56782007-03-27 Jon Ringle <jon@ringle.org>
5679
5680 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5681
9453113a
DJ
56822007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5683
5684 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5685
64a69107
DJ
56862007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5687
5688 * terminal.h: Check HAVE_SGTTY_H.
5689
56902007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
5691
5692 * remote-utils.c (remote_open): Print out the assigned port number.
5693
c74d0ad8
DJ
56942007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5695
5696 * remote-utils.c (monitor_output): New function.
5697 * server.c (debug_threads): Define here.
5698 (monitor_show_help): New function.
5699 (handle_query): Handle qRcmd.
5700 (main): Do not handle 'd' packet.
5701 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5702 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5703 of debug_threads.
5704
de7c3b4a
PA
57052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5706
5707 * Makefile.in (EXEEXT): New.
5708 (clean): Use $(EXEEXT).
5709
ef57601b
PA
57102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5711
5712 * target.h (target_ops): Rename send_signal to request_interrupt,
5713 and remove enum target_signal parameter.
5714 * linux-low.c (linux_request_interrupt): Rename from
5715 linux_send_signal, and always send SIGINT.
5716 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5717 and always send SIGINT.
5718 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5719 of send_signal.
5720 (input_interrupt): Likewise.
5721
820f2bda
PA
57222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5723
5724 * server.c (get_features_xml): Check if target implemented
5725 arch_string.
5726 * win32-i386-low.c (win32_arch_string): New.
5727 (win32_target_ops): Add win32_arch_string as arch_string member.
5728
ab39bf24
UW
57292007-02-22 Markus Deuling <deuling@de.ibm.com>
5730
5731 * spu-low.c (spu_arch_string): New.
5732 (spu_target_ops): Add spu_arch_string.
5733
61ff6e04
DJ
57342007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5735
5736 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5737 * configure.ac: Do not check for terminal.h.
5738 * configure, config.in: Regenerated.
5739
fb1e4ffc
DJ
57402007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5741
5742 * Makefile.in (OBS): Add $(XML_BUILTIN).
5743 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5744 (clean): Update.
5745 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5746 (arm-with-iwmmxt.c): New.
5747 * config.in, configure: Regenerate.
5748 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5749 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5750 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5751 (arm*-*-linux*): Add iWMMXt and regset support.
5752 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5753 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5754 (arm_store_wmmxregset, target_regsets): New.
5755 * server.c (get_features_xml): Take annex argument. Check builtin
5756 XML documents.
5757 (handle_query): Handle multiple annexes.
5758
0f48aa01
DJ
57592007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5760
5761 * remote-utils.c [USE_WIN32API] (read, write): Define.
5762 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5763 write.
5764
23181151
DJ
57652007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5766
5767 * linux-i386-low.c (the_low_target): Set arch_string.
5768 * linux-x86-64-low.c (the_low_target): Likewise.
5769 * linux-low.c (linux_arch_string): New.
5770 (linux_target_ops): Add it.
5771 * linux-low.h (struct linux_target_ops): Add arch_string.
5772 * server.c (write_qxfer_response): Use const void * for DATA.
5773 (get_features_xml): New.
5774 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5775 * target.h (struct target_ops): Add arch_string method.
5776
9d606399
DJ
57772007-01-03 Denis Pilat <denis.pilat@st.com>
5778 Daniel Jacobowitz <dan@codesourcery.com>
5779
5780 * linux-low.c (linux_kill): Handle being called with no threads.
5781 * win32-i386-low.c (win32_kill): Likewise.
5782 (get_child_debug_event): Clear current_process_handle.
5783
57842006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
5785 Daniel Jacobowitz <dan@codesourcery.com>
5786
5787 * remote-utils.c (remote_open): Check the type of specified
5788 serial port devices before opening them.
5789 * server.c (main): Kill the inferior if an error occurs during
5790 the first remote_open.
5791
a5e13d24
DJ
57922006-12-05 Markus Deuling <deuling@de.ibm.com>
5793
5794 * README: Update supported targets.
5795
186947f7
DJ
57962006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5797
5798 * Makefile.in (clean): Remove reg-mips64.c.
5799 (reg-mips64.c, reg-mips64.o): New rules.
5800 * configure.srv: Handle mips64. Include regset support for mips.
5801 * linux-mips-low.c (union mips_register): New.
5802 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5803 (mips_breakpoint, mips_breakpoint_at): Use int.
5804 (mips_collect_register, mips_supply_register)
5805 (mips_collect_register_32bit, mips_supply_register_32bit)
5806 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5807 (mips_store_fpregset, target_regsets): New.
5808 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5809
a13e2c95
UW
58102006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5811
5812 * configure.srv: Add target "spu*-*-*".
5813 * Makefile.in (clean): Remove reg-spu.c.
5814 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5815 * spu-low.c: New file.
5816
cb7283db
DJ
58172006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5818
5819 * configure.ac: Correct td_thr_tls_get_addr test.
5820 * configure: Regenerated.
5821
89be2091
DJ
58222006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5823
5824 * linux-low.c (linux_wait_for_event): Reformat. Use the
5825 pass_signals array.
5826 * remote-utils.c (decode_address_to_semicolon): New.
5827 * server.c (pass_signals, handle_general_set): New.
5828 (handle_query): Mention QPassSignals for qSupported.
5829 (main): Call handle_general_set.
5830 * server.h (pass_signals, decode_address_to_semicolon): New.
5831
000ef4f0
DJ
58322006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5833
5834 * server.c (handle_query): Correct error handling for read_auxv.
5835
b7149293
UW
58362005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5837
5838 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5839 and srv_linux_thread_db to yes.
5840 * linux-s390-low.c (s390_fill_gregset): New function.
5841 (target_regsets): Define data structure.
5842
dae5f5cf
DJ
58432006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5844
5845 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5846 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5847 * config.in, configure: Regenerated.
5848 * inferiors.c (gdb_id_to_thread): New function.
5849 (gdb_id_to_thread_id): Use it.
5850 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5851 * linux-low.h (struct process_info): Add th member.
5852 (thread_db_get_tls_address): New prototype.
5853 * remote-utils.c (decode_address): Make non-static.
5854 * server.c (handle_query): Handle qGetTLSAddr.
5855 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5856 * target.h (struct target_ops): Add get_tls_address.
5857 * thread-db.c (maybe_attach_thread): Save the thread handle.
5858 (thread_db_get_tls_address): New.
5859
32ca6d61
DJ
58602006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5861
5862 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5863 (linux_resume_one_process): Take a siginfo_t *. Update all
5864 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5865 (struct pending_signals): Add a siginfo_t.
5866 (linux_wait_for_process): Always set last_status.
5867 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5868 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5869 * linux-low.h (struct process_info): Add last_status.
5870
5ffff7c1
DJ
58712006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5872
5873 * remote-utils.c (try_rle): New function.
5874 (putpkt_binary): Use it.
5875
8695c747
DJ
58762006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5877
5878 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5879 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5880 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5881 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5882 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5883 point registers.
5884
290fadea
RS
58852006-08-08 Richard Sandiford <richard@codesourcery.com>
5886
5887 * server.c (terminal_fd): New variable.
5888 (old_foreground_pgrp): Likewise.
5889 (restore_old_foreground_pgrp): New function.
5890 (start_inferior): Record the terminal file descriptor in terminal_fd
5891 and its original foreground group in old_foreground_pgrp. Register
5892 restore_old_foreground_pgrp with atexit().
5893
9f2e1e63
DJ
58942006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5895
5896 * server.c (handle_query): Correct qPart to qXfer.
5897
b80864fb
DJ
58982006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5899
5900 * configure.ac: Check for more headers which are missing on
5901 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5902 * configure.srv: Add Cygwin and mingw32.
5903 * remote-utils.c: Don't include headers unconditionally which
5904 are missing on mingw32. Include <winsock.h> for mingw32.
5905 (remote_open): Adjust for mingw32 support. Flush
5906 standard error after writing to it.
5907 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5908 (unblock_async_io, enable_async_io, disable_async_io)
5909 (readchar, getpkt): Update for Winsock support.
5910 (prepare_resume_reply): Expect a protocol signal number.
5911 * server.c: Disable <sys/wait.h> on mingw32.
5912 (start_inferior): Adjust for mingw32 support. Flush
5913 standard error after writing to it.
5914 (attach_inferior): Likewise. Use protocol signal
5915 numbers.
5916 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5917 and names.
5918 * win32-i386-low.c: New file.
5919 * Makefile.in (XM_CLIBS): Set.
5920 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5921 (win32-i386-low.o): New dependency rule.
5922 * linux-low.c (linux_wait): Use target signal numbers.
5923 * target.h (struct target_ops): Doc fix.
5924 * server.h (target_signal_to_name): New prototype.
5925 * gdbreplay.c: Don't include headers unconditionally which
5926 are missing on mingw32. Include <winsock.h> for mingw32.
5927 (remote_close, remote_open): Adjust for Winsock support.
5928 * configure, config.in: Regenerated.
5929
0876f84a
DJ
59302006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5931
5932 * server.c (decode_xfer_read, write_qxfer_response): New.
5933 (handle_query): Take a packet length argument. Handle
5934 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5935 the qSupported response.
5936 (main): Update call to handle_query.
5937
01f9e8fa
DJ
59382006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5939
5940 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5941 (putpkt_binary): Renamed from putpkt and adjusted for binary
5942 data.
5943 (putpkt): New wrapper for putpkt_binary.
5944 (readchar): Don't mask off the high bit.
5945 (decode_X_packet): New function.
5946 * server.c (main): Call putpkt_binary if a handler sets the packet
5947 length. Save the length of the incoming packet. Handle 'X'.
5948 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5949
be2a5f71
DJ
59502006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5951
5952 * server.c (handle_query): Handle qSupported.
5953
ea025f5f
DJ
59542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5955
5956 * remote-utils.c (all_symbols_looked_up): New variable.
5957 (look_up_one_symbol): Check it.
5958 * server.h (look_up_one_symbol): New declaration.
5959 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5960
9308fc88
DJ
59612006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5962
5963 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 5964 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
5965 (PTRACE_GET_THREAD_AREA): Define.
5966 (ps_get_thread_area): New function.
5967
52fb6437
NS
59682006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5969
5970 * configure.srv (m68k*-*-uclinux*): New target.
5971 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5972 (linux_resume_one_process): Remove extraneous cast.
5973 (linux_read_offsets): New.
5974 (linux_target_op): Add linux_read_offsets on mmuless systems.
5975 * server.c (handle_query): Add qOffsets logic.
5976 * target.h (struct target_ops): Add read_offsets.
5977
21b0f40c
DJ
59782006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5979
5980 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5981 (PTRACE_GET_THREAD_AREA): Define.
5982 (ps_get_thread_area): New function.
5983 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5984 (linux-x86-64-low.o): Update.
5985
0050a760
DJ
59862006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5987
5988 * configure.ac: Remove checks for prfpregset_t.
5989 * gdb_proc_service.h: New file.
5990 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5991 new "gdb_proc_service.h".
5992 * proc-service.c: Likewise.
5993 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5994 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5995 * Makefile.in (gdb_proc_service_h): Updated.
5996 * configure, config.in: Regenerated.
5997
b92a518e
DJ
59982006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5999
6000 * remote-utils.c (prepare_resume_reply): Move declaration
6001 of gdb_id_from_wait to the top of the block.
6002
545587ee
DJ
60032006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6004
6005 * linux-low.c (regsets_store_inferior_registers): Read the regset
6006 from the target before filling it.
6007
9db87ebd
DJ
60082006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6009
6010 * server.c (attach_inferior): Return SIGTRAP for a successful
6011 attach.
6012
dd24457d
DJ
60132006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6014
6015 * Makefile.in (OBS): Add version.o.
6016 (STAGESTUFF): Delete.
6017 (version.o): Add dependencies.
6018 (version.c): Replace rule.
6019 (clean): Remove version.c.
6020 * server.c (gdbserver_version): New.
6021 (gdbserver_usage): Use printf.
6022 (main): Handle --version and --help.
6023 * server.h (version, host_name): Add declarations.
6024
6f0f660e
EZ
60252005-12-23 Eli Zaretskii <eliz@gnu.org>
6026
889bf7c5
PA
6027 * linux-arm-low.c:
6028 * linux-arm-low.c:
6029 * inferiors.c:
6030 * i387-fp.h:
6031 * i387-fp.c:
6032 * gdbreplay.c:
6033 * regcache.c:
6034 * proc-service.c:
6035 * mem-break.h:
6036 * mem-break.c:
6037 * linux-x86-64-low.c:
6038 * linux-sh-low.c:
6039 * linux-s390-low.c:
6040 * linux-ppc64-low.c:
6041 * linux-ppc-low.c:
6042 * linux-mips-low.c:
6043 * linux-m68k-low.c:
6044 * linux-m32r-low.c:
6045 * linux-low.h:
6046 * linux-low.c:
6047 * linux-ia64-low.c:
6048 * linux-i386-low.c:
6049 * linux-crisv32-low.c:
6050 * thread-db.c:
6051 * terminal.h:
6052 * target.h:
6053 * target.c:
6054 * server.h:
6055 * server.c:
6056 * remote-utils.c:
6057 * regcache.h:
6058 * utils.c:
6059 * Makefile.in:
6060 * configure.ac:
6f0f660e
EZ
6061 * gdbserver.1: Add (C) after Copyright. Update the FSF
6062 address.
6063
9d1fb177
DJ
60642005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6065
6066 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6067 (arm_breakpoint_at): Recognize both breakpoints.
6068 (the_low_target): Use the correct breakpoint instruction.
6069
011a70c2
DJ
60702005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6071
6072 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6073 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6074 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6075 (the_low_target): Update.
6076
7fb85e41
AS
60772005-10-25 Andreas Schwab <schwab@suse.de>
6078
6079 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6080
6081 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6082 (ia64_num_regs): Reduce to 462.
6083
3db0444b
DJ
60842005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6085
6086 * acinclude.m4: Correct quoting.
6087 * aclocal.m4: Regenerated.
6088
6089 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6090 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6091 (thread_db_init): Call thread_db_err_str.
6092 * configure.ac: Check for TD_VERSION.
6093 * config.in, configure: Regenerated.
6094
bee0189a
DJ
60952005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6096
6097 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6098
e9d25b98
DJ
60992005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6100
6101 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6102 is not available. Define HAVE_PTRACE_GETREGS if it is.
6103 * config.in, configure: Regenerated.
6104 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6105 * linux-i386-low.c, linux-m68k-low.c: Update to use
6106 HAVE_PTRACE_GETREGS.
6107 * linux-low.c (regsets_fetch_inferior_registers)
6108 (regsets_store_inferior_registers): Only return 0 if we processed
6109 GENERAL_REGS.
6110 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6111 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6112
a06660f7
DJ
61132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6114
6115 * inferiors.c (struct thread_info): Add gdb_id.
6116 (add_thread): Add gdb_id argument.
6117 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6118 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6119 calls to add_thread.
6120 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6121 * server.c (handle_query): Use thread_to_gdb_id.
6122 (handle_v_cont, main): Use gdb_id_to_thread_id.
6123 * server.h (add_thread): Update prototype.
6124 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6125 prototypes.
6126
5a1f5858
DJ
61272005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6128
6129 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6130 left-padded registers.
6131 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6132 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6133
e122f1f5
SE
61342005-07-01 Steve Ellcey <sje@cup.hp.com>
6135
6136 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6137 * configure: Regenerate.
6138 * config.in: Regenerate.
6139 * server.h (NEED_DECLARATION_STRERROR):
6140 Replace with !HAVE_DECL_STRERROR.
6141
d592fa2f
DJ
61422005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6143
6144 * linux-low.c (linux_wait, linux_send_signal): Don't test
6145 an unsigned long variable for > 0 if it could be MAX_ULONG.
6146 * server.c (myresume): Likewise.
6147 * target.c (set_desired_inferior): Likewise.
6148
ccbd4912
MK
61492005-06-13 Mark Kettenis <kettenis@gnu.org>
6150
6151 * configure.ac: Simplify and improve check for socklen_t.
6152 * configure, config.in: Regenerate.
6153
f450004a
DJ
61542005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6155
6156 * acconfig.h: Remove.
6157 * configure.ac: Add a test for socklen_t. Use three-argument
6158 AC_DEFINE throughout.
6159 * config.in: Regenerated using autoheader 2.59.
6160 * configure: Regenerated.
6161
6162 * gdbreplay.c (socklen_t): Provide a default.
6163 (remote_open): Use socklen_t.
6164 * remote-utils.c (socklen_t): Provide a default.
6165 (remote_open): Use socklen_t.
6166 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6167 unsigned char.
6168
6169 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6170 char for buffers.
6171 * linux-low.c (linux_read_memory, linux_write_memory)
6172 (linux_read_auxv): Likewise.
6173 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6174 (check_mem_write): Likewise.
6175 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6176 Likewise.
6177 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6178 (registers_from_string, register_data): Likewise.
6179 * server.c (handle_query, main): Likewise.
6180 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6181 (decode_M_packet): Likewise.
6182 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6183 * target.h (struct target_ops): Update read_memory, write_memory,
6184 and read_auxv.
6185 (read_inferior_memory, write_inferior_memory): Update.
6186 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6187 to unsigned char *.
6188 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6189 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6190 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6191 linux-s390-low.c, linux-sh-low.c: Update for changes in
6192 read_inferior_memory and the_low_target->breakpoint.
6193
eee84df1
DJ
61942005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6195
6196 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6197 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6198 * configure.srv: Add powerpc64-*-linux*.
6199 * linux-ppc64-low.c: New file.
6200
45b134e5
OF
62012005-05-23 Orjan Friberg <orjanf@axis.com>
6202
6203 * linux-cris-low.c: New file with support for CRIS.
6204 * linux-crisv32-low.c: Ditto for CRISv32.
6205 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6206 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 6207 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
6208 reg-crisv32.o, and reg-crisv32.c to make rules.
6209 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6210 recognized targets.
6211
48d93c75
UW
62122005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6213
6214 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6215 of sizeof (PTRACE_XFER_TYPE).
6216 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6217
e013ee27
OF
62182005-05-12 Orjan Friberg <orjanf@axis.com>
6219
889bf7c5 6220 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
6221 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6222 pointers for hardware watchpoint support.
6223 * linux-low.h (struct linux_target_ops): Ditto.
6224 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6225 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6226 to linux_target_ops.
6227 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6228 reply packet.
6229 * server.c (main): Recognize 'Z' and 'z' packets.
6230
b0ded00b
UW
62312005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6232
6233 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6234 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6235 (the_low_target): Add new members.
6236
8643e2ad
DJ
62372005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6238
6239 * proc-service.c (ps_lgetregs): Search all_processes instead of
6240 all_threads.
6241
fc620387
DJ
62422005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6243
6244 * server.c (start_inferior): Change return type to int.
6245 (attach_inferior): Change sigptr to int *.
6246 (handle_v_cont, handle_v_requests): Change signal to int *.
6247 (main): Change signal to int.
6248
62492005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
6250
6251 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6252 * configure.srv: Add m32r*-*-linux*.
6253 * linux-m32r-low.c: New file.
6254
e0e76420
DJ
62552005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6256
6257 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6258
a1928bad
DJ
62592005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6260
6261 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6262 Take unsigned long arguments for PIDs.
6263 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6264 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6265 (wait_for_sigstop, linux_resume_one_process)
6266 (regsets_fetch_inferior_registers, linux_send_signal)
6267 (linux_read_auxv): Likewise. Update the types of variables holding
6268 PIDs. Update format string specifiers.
6269 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6270 * remote-utils.c (prepare_resume_reply): Likewise.
6271 * server.c (cont_thread, general_thread, step_thread)
6272 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6273 unsigned long.
6274 (handle_query): Update format specifiers.
6275 (handle_v_cont, main): Use strtoul for thread IDs.
6276 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6277 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6278 (general_thread, step_thread, thread_from_wait)
6279 (old_thread_from_wait): Update.
6280 * target.h (struct thread_resume): Use unsigned long for THREAD.
6281 (struct target_ops): Use unsigned long for arguments to attach and
6282 thread_alive.
6283
dcdb98d2
DJ
62842005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6285
6286 * acinclude.m4: Include bfd/bfd.m4 directly.
6287 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6288 <agriffis@toolchain.org>.
6289 * aclocal.m4, configure: Regenerated.
6290
bec39cab
AC
62912005-01-07 Andrew Cagney <cagney@gnu.org>
6292
6293 * configure.ac: Rename configure.in, require autoconf 2.59.
6294 * configure: Re-generate.
6295
434c4c77
DJ
62962004-12-08 Daniel Jacobowitz <dan@debian.org>
6297
6298 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6299 LIBS when finished.
6300 * aclocal.m4: Regenerated.
6301 * configure: Regenerated.
6302
db1d3e1b
AS
63032004-11-21 Andreas Schwab <schwab@suse.de>
6304
6305 * linux-m68k-low.c (m68k_num_gregs): Define.
6306 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6307 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6308 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6309 (m68k_breakpoint_at): New. Add to the_low_target.
6310
6311 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6312 srv_linux_thread_db to yes.
6313
43360365
JB
63142004-10-20 Joel Brobecker <brobecker@gnat.com>
6315
6316 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6317 (ARCH_SET_FS): Likewise.
6318 (ARCH_GET_FS): Likewise.
6319 (ARCH_GET_GS): Likewise.
6320
fd500816
DJ
63212004-10-16 Daniel Jacobowitz <dan@debian.org>
6322
6323 * linux-i386-low.c (ps_get_thread_area): New.
6324 * linux-x86-64-low.c (ps_get_thread_area): New.
6325 * linux-low.c: Include <sys/syscall.h>.
6326 (linux_kill_one_process): Don't kill the first thread here.
6327 (linux_kill): Kill the first thread here.
6328 (kill_lwp): New function.
6329 (send_sigstop, linux_send_signal): Use it.
6330 * proc-service.c: Clean up #ifdefs.
6331 (fpregset_info): Delete.
6332 (ps_lgetregs): Update and enable implementation.
6333 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6334 implementations.
6335 * remote-utils.c (struct sym_cache, symbol_cache): New.
6336 (input_interrupt): Print a clearer message.
6337 (async_io_enabled): New variable.
6338 (enable_async_io, disable_async_io): Use it. Update comments.
6339 (look_up_one_symbol): Use the symbol cache.
6340 * thread-db.c (thread_db_look_up_symbols): New function.
6341 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6342
f6de3c42
DJ
63432004-10-16 Daniel Jacobowitz <dan@debian.org>
6344
6345 * configure.in: Test for -rdynamic.
6346 * configure: Regenerated.
6347 * Makefile (INTERNAL_LDFLAGS): New.
6348 (gdbserver, gdbreplay): Use it.
6349
2c0fc042
AC
63502004-09-02 Andrew Cagney <cagney@gnu.org>
6351
6352 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6353
075b3282
DJ
63542004-03-23 Daniel Jacobowitz <drow@mvista.com>
6355
6356 * linux-low.c (linux_wait): Clear all_processes list also.
6357
fa6a77dc
DJ
63582004-03-12 Daniel Jacobowitz <drow@mvista.com>
6359
6360 * linux-low.c: Include <errno.h>. Remove extern declaration of
6361 errno.
6362
6d782a97
DJ
63632004-03-12 Daniel Jacobowitz <drow@mvista.com>
6364
6365 * gdbreplay.c, server.h, utils.c: Update copyright years.
6366
3a7fb99b
DJ
63672004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6368
6369 * server.c (main): Print child status or termination signal from
6370 variable 'signal', not 'sig'.
6371
c3e735a6
DJ
63722004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6373
6374 * linux-low.c (linux_read_memory): Change return type to
6375 int. Check for and return error from ptrace().
6376 * target.c (read_inferior_memory): Change return type to int. Pass
6377 back return status from the_target->read_memory().
6378 * target.h (struct target_ops): Adapt *read_memory() prototype.
6379 Update comment.
6380 (read_inferior_memory): Adapt prototype.
6381 * server.c (main): Return an error packet if
6382 read_inferior_memory() returns an error.
6383
a59d1c82
DJ
63842004-03-04 Daniel Jacobowitz <drow@mvista.com>
6385
6386 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6387 Unify with other clean targets.
6388
dc3f8883
DJ
63892004-02-29 Daniel Jacobowitz <drow@mvista.com>
6390
6391 * server.c (handle_v_cont): Call set_desired_inferior.
6392
89a208da
DJ
63932004-02-29 Daniel Jacobowitz <drow@mvista.com>
6394
6395 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6396
62ea82f5
DJ
63972004-02-29 Daniel Jacobowitz <drow@mvista.com>
6398
6399 * linux-low.c (linux_wait): Unblock async I/O.
6400 (linux_resume): Block and enable async I/O.
6401 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6402 * server.h (block_async_io, unblock_async_io): Add prototypes.
6403
6910d122
DJ
64042004-02-29 Daniel Jacobowitz <drow@mvista.com>
6405
6406 * remote-utils.c (remote_open): Print a status notice after
6407 opening a TCP port.
6408 * server.c (attach_inferior): Print a status notice after
6409 attaching.
6410
64112004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
6412
6413 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6414
c89dc5d4
DJ
64152004-02-26 Daniel Jacobowitz <drow@mvista.com>
6416
6417 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6418 error packet.
6419 * server.c, target.h: Update copyright years.
6420
4b8dad4a
RM
64212004-02-25 Roland McGrath <roland@redhat.com>
6422
6423 * target.h (struct target_ops): New member `read_auxv'.
6424 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6425 * linux-low.c (linux_read_auxv): New function.
6426 (linux_target_ops): Initialize `read_auxv' member to that.
6427
d7446758
JB
64282004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6429
6430 Committed by Jim Blandy <jimb@redhat.com>.
6431
6432 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 6433 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
6434 instead of GPR_SIZE to distiguish s390 and s390x targets.
6435
5544ad89
DJ
64362004-01-31 Daniel Jacobowitz <drow@mvista.com>
6437
6438 * linux-low.c: Update copyright year.
6439 (check_removed_breakpoint): Clear pending_is_breakpoint.
6440 (linux_set_resume_request, linux_queue_one_thread)
6441 (resume_status_pending_p): New functions.
6442 (linux_continue_one_thread): Use process->resume.
6443 (linux_resume): Only resume threads if there are no pending events.
6444 * linux-low.h (struct process_info): Add resume request
6445 pointer.
6446
2a68b70e
DJ
64472004-01-30 Daniel Jacobowitz <drow@mvista.com>
6448
6449 * regcache.c (new_register_cache): Clear the allocated register
6450 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6451
64386c31
DJ
64522003-10-13 Daniel Jacobowitz <drow@mvista.com>
6453
6454 * linux-low.c (linux_resume): Take a struct thread_resume *
6455 argument.
6456 (linux_wait): Update call.
6457 (resume_ptr): New static variable.
6458 (linux_continue_one_thread): Renamed from
6459 linux_continue_one_process. Use resume_ptr.
6460 (linux_resume): Use linux_continue_one_thread.
6461 * server.c (handle_v_cont, handle_v_requests): New functions.
6462 (myresume): New function.
6463 (main): Handle 'v' case.
6464 * target.h (struct thread_resume): New type.
6465 (struct target_ops): Change argument of "resume" to struct
6466 thread_resume *.
6467 (myresume): Delete macro.
6468
c938e9b0
L
64692003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6470
6471 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6472 (uninstall): Support DESTDIR.
6473
7f313d07
BC
6474Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6475
6476 * configure.srv: Add xscale*linux copy of arm*linux entry.
6477
3b2fc2ea
DJ
64782003-07-24 Daniel Jacobowitz <drow@mvista.com>
6479
6480 * linux-arm-low.c (arm_reinsert_addr): New function.
6481 (the_low_target): Add arm_reinsert_addr.
6482
1c0a559e
MK
64832003-07-08 Mark Kettenis <kettenis@gnu.org>
6484
6485 * mem-break.c: Remove whitespace at end of file.
6486
43d5792c
DJ
64872003-06-28 Daniel Jacobowitz <drow@mvista.com>
6488
6489 * configure.in: Check whether we need to prototype strerror.
6490 * server.h: Optionally prototype strerror.
6491 * gdbreplay.c (perror_with_name): Use strerror.
6492 * linux-low.c (linux_attach_lwp): Use strerror.
6493 * utils.c (perror_with_name): Use strerror.
6494 * config.in, configure: Regenerated.
6495
c8a86edf
DJ
64962003-06-28 Daniel Jacobowitz <drow@mvista.com>
6497
6498 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6499 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6500
73d37363
DJ
65012003-06-20 Daniel Jacobowitz <drow@mvista.com>
6502
6503 * Makefile.in (SFILES): Update.
6504 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6505 low-sun3.c: Remove files.
6506
6ad8ae5c
DJ
65072003-06-17 Daniel Jacobowitz <drow@mvista.com>
6508
6509 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6510 (linux_detach_one_process, linux_detach): New functions.
6511 (linux_target_ops): Add linux_detach.
6512 * server.c (main): Handle 'D' packet.
6513 * target.h (struct target_ops): Add "detach" member.
6514 (detach_inferior): Define.
6515
1581182a
MK
65162003-06-13 Mark Kettenis <kettenis@gnu.org>
6517
6518 From Kelley Cook <kelleycook@wideopenwest.com>:
6519 * configure.srv: Accept i[34567]86 variants.
6520
e5379b03
DJ
65212003-06-05 Daniel Jacobowitz <drow@mvista.com>
6522
6523 * linux-low.c (linux_wait_for_event): Correct comment typos.
6524 (linux_resume_one_process): Call check_removed_breakpoint.
6525 (linux_send_signal): New function.
6526 (linux_target_ops): Add linux_send_signal.
6527 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6528 of kill.
6529 * target.h (struct target_ops): Add send_signal.
6530
2ff29de4
JB
65312003-05-29 Jim Blandy <jimb@redhat.com>
6532
6533 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6534 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6535 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6536 away part of the register's value.
6537
254787d4
DJ
65382003-03-26 Daniel Jacobowitz <drow@mvista.com>
6539
6540 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6541 (linux_wait_for_event, linux_init_signals): Likewise.
6542
94e10508
DJ
65432003-03-17 Daniel Jacobowitz <drow@mvista.com>
6544
6545 * configure.in: Check for stdlib.h.
6546 * configure: Regenerated.
6547 * config.in: Regenerated.
6548
4c0711e0
DJ
65492003-01-04 Andreas Schwab <schwab@suse.de>
6550
6551 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6552
ef66e766
AC
65532003-01-02 Andrew Cagney <ac131313@redhat.com>
6554
6555 * Makefile.in: Remove obsolete code.
6556
a1358604
DJ
65572002-11-20 Daniel Jacobowitz <drow@mvista.com>
6558
6559 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6560 defined(PT_FPR0_HI).
6561
23ce3b1c
DJ
65622002-11-17 Stuart Hughes <seh@zee2.com>
6563
6564 * linux-arm-low.c (arm_num_regs): Increase.
6565 (arm_regmap): Include status register.
6566
65672002-11-17 Daniel Jacobowitz <drow@mvista.com>
6568
6569 * linux-low.c (register_addr): Remove incorrect -1 check.
6570
a9fa9f7d
DJ
65712002-08-29 Daniel Jacobowitz <drow@mvista.com>
6572
6573 * linux-low.c (linux_create_inferior): Call setpgid. Return
6574 the new PID.
6575 (unstopped_p, linux_signal_pid): Remove.
6576 (linux_target_ops): Remove linux_signal_pid.
6577 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6578 global instead of target method.
6579 * target.h (struct target_ops): Remove signal_pid. Update comment
6580 for create_inferior.
6581 * server.c (signal_pid): New variable.
6582 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 6583 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
6584 (attach_inferior): Set signal_pid.
6585
17574093
DJ
65862002-08-23 Daniel Jacobowitz <drow@mvista.com>
6587
6588 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6589
65902002-08-20 Jim Blandy <jimb@redhat.com>
6591
6592 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6593 default for this.
6594
65952002-08-01 Andrew Cagney <cagney@redhat.com>
6596
6597 * Makefile.in: Make chill references obsolete.
6598
65992002-07-24 Kevin Buettner <kevinb@redhat.com>
6600
6601 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6602 * configure: Regenerate.
6603 * config.in: Regenerate.
6604
66052002-07-09 David O'Brien <obrien@FreeBSD.org>
6606
6607 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6608 (perror_with_name, remote_close, remote_open, expect, play): Static.
6609
66102002-07-04 Michal Ludvig <mludvig@suse.cz>
6611
4b8dad4a 6612 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
6613 byte offsets instead of an array of indexes.
6614 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6615
66162002-06-13 Daniel Jacobowitz <drow@mvista.com>
6617
6618 * regcache.c: Add comment.
6619
66202002-06-11 Daniel Jacobowitz <drow@mvista.com>
6621
6622 * thread-db.c: New file.
6623 * proc-service.c: New file.
6624 * acinclude.m4: New file.
6625 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6626 proc-service.o, and thread-db.o.
6627 (linux-low.o): Add USE_THREAD_DB.
6628 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6629 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6630 * aclocal.m4: Regenerated.
6631 * config.in: Regenerated.
6632 * configure: Regenerated.
6633 * configure.in: Check for proc_service.h, sys/procfs.h,
6634 thread_db.h, and linux/elf.h headrs.
6635 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6636 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6637 Check for -lthread_db and thread support.
6638 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6639 PowerPC, and SuperH.
6640 * i387-fp.c: Constify arguments.
6641 * i387-fp.h: Likewise.
6642 * inferiors.c: (struct thread_info): Renamed from
6643 `struct inferior_info'. Remove PID member. Use generic inferior
6644 list header. All uses updated.
6645 (inferiors, signal_pid): Removed.
6646 (all_threads): New variable.
6647 (get_thread): Define.
6648 (add_inferior_to_list): New function.
6649 (for_each_inferior): New function.
6650 (change_inferior_id): New function.
6651 (add_inferior): Removed.
6652 (remove_inferior): New function.
6653 (add_thread): New function.
6654 (free_one_thread): New function.
6655 (remove_thread): New function.
6656 (clear_inferiors): Use for_each_inferior and free_one_thread.
6657 (find_inferior): New function.
6658 (find_inferior_id): New function.
6659 (inferior_target_data): Update argument type.
6660 (set_inferior_target_data): Likewise.
6661 (inferior_regcache_data): Likewise.
6662 (set_inferior_regcache_data): Likewise.
6663 * linux-low.c (linux_bp_reinsert): Remove.
6664 (all_processes, stopping_threads, using_thrads)
6665 (struct pending_signals, debug_threads, pid_of): New.
6666 (inferior_pid): Replace with macro.
6667 (struct inferior_linux_data): Remove.
6668 (get_stop_pc, add_process): New functions.
6669 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6670 Use add_process and add_thread.
6671 (linux_attach_lwp): New function, based on old linux_attach. Use
6672 add_process and add_thread. Set stop_expected for new threads.
6673 (linux_attach): New function.
6674 (linux_kill_one_process): New function.
6675 (linux_kill): Kill all LWPs.
6676 (linux_thread_alive): Use find_inferior_id.
6677 (check_removed_breakpoints, status_pending_p): New functions.
6678 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6679 Update. Use WNOHANG. Wait for cloned processes also. Update process
6680 struct for the found process.
6681 (linux_wait_for_event): New function.
6682 (linux_wait): Use it. Support LWPs.
6683 (send_sigstop, wait_for_sigstop, stop_all_processes)
6684 (linux_resume_one_process, linux_continue_one_process): New functions.
6685 (linux_resume): Support LWPs.
6686 (REGISTER_RAW_SIZE): Remove.
6687 (fetch_register): Use register_size instead. Call supply_register.
6688 (usr_store_inferior_registers): Likewise. Call collect_register.
6689 Fix recursive case.
6690 (regsets_fetch_inferior_registers): Improve error message.
6691 (regsets_store_inferior_registers): Add debugging.
6692 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6693 (unstopped_p, linux_signal_pid): New functions.
6694 (linux_target_ops): Add linux_signal_pid.
6695 (linux_init_signals): New function.
6696 (initialize_low): Call it. Initialize using_threads.
6697 * regcache.c (inferior_regcache_data): Add valid
6698 flag.
6699 (get_regcache): Fetch registers lazily. Add fetch argument
6700 and update all callers.
6701 (regcache_invalidate_one, regcache_invalidate): New
6702 functions.
6703 (new_register_cache): Renamed from create_register_cache.
6704 Return the new regcache.
6705 (free_register_cache): Change argument to a void *.
6706 (registers_to_string, registers_from_string): Call get_regcache
6707 with fetch flag set.
6708 (register_data): Make static. Pass fetch flag to get_regcache.
6709 (supply_register): Call get_regcache with fetch flag clear.
6710 (collect_register): Call get_regcache with fetch flag set.
6711 (collect_register_as_string): New function.
6712 * regcache.h: Update.
6713 * remote-utils.c (putpkt): Flush after debug output and use
6714 stderr.
6715 Handle input interrupts while waiting for an ACK.
6716 (input_interrupt): Use signal_pid method.
6717 (getpkt): Flush after debug output and use stderr.
6718 (outreg): Use collect_register_as_string.
6719 (new_thread_notify, dead_thread_notify): New functions.
6720 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6721 and general_thread.
6722 (look_up_one_symbol): Flush after debug output.
6723 * server.c (step_thread, server_waiting): New variables.
6724 (start_inferior): Don't use signal_pid. Update call to mywait.
6725 (attach_inferior): Update call to mywait.
6726 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6727 (main): Don't fetch/store registers explicitly. Use
6728 set_desired_inferior. Support proposed ``Hs'' packet. Update
6729 calls to mywait.
6730 * server.h: Update.
6731 (struct inferior_list, struct_inferior_list_entry): New.
6732 * target.c (set_desired_inferior): New.
6733 (write_inferior_memory): Constify.
6734 (mywait): New function.
6735 * target.h: Update.
6736 (struct target_ops): New signal_pid method.
6737 (mywait): Removed macro, added prototype.
6738
6739 * linux-low.h (regset_func): Removed.
6740 (regset_fill_func, regset_store_func): New.
6741 (enum regset_type): New.
6742 (struct regset_info): Add type field. Use new operation types.
6743 (struct linux_target_ops): stop_pc renamed to get_pc.
6744 Add decr_pc_after_break and breakpoint_at.
6745 (get_process, get_thread_proess, get_process_thread)
6746 (strut process_info, all_processes, linux_attach_lwp)
6747 (thread_db_init): New.
6748
6749 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6750 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6751 (the_low_target): Add new members.
6752 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6753 (i386_store_fpxregset): Constify.
6754 (target_regsets): Add new kind identifier.
6755 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6756 (i386_set_pc): Add debugging.
6757 (i386_breakpoint_at): New function.
6758 (the_low_target): Add new members.
6759 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6760 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6761 (mips_breakpoint_at): New.
6762 (the_low_target): Add new members.
6763 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6764 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6765 (the_low_target): Add new members.
6766 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6767 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6768 (the_low_target): Add new members.
6769 * linux-x86-64-low.c (target_regsets): Add new kind
6770 identifier.
6771
67722002-05-15 Daniel Jacobowitz <drow@mvista.com>
6773
6774 From Martin Pool <mbp@samba.org>:
6775 * server.c (gdbserver_usage): New function.
6776 (main): Call it.
6777
67782002-05-14 Daniel Jacobowitz <drow@mvista.com>
6779
6780 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6781 stop_at -> stop_pc.
6782
67832002-05-04 Andrew Cagney <ac131313@redhat.com>
6784
6785 * Makefile.in: Remove obsolete code.
6786
67872002-04-24 Michal Ludvig <mludvig@suse.cz>
6788
6789 * linux-low.c (regsets_fetch_inferior_registers),
6790 (regsets_store_inferior_registers): Removed cast to int from
6791 ptrace() calls.
6792 * regcache.h: Added declaration of struct inferior_info.
6793
67942002-04-20 Daniel Jacobowitz <drow@mvista.com>
6795
6796 * inferiors.c (struct inferior_info): Add regcache_data.
6797 (add_inferior): Call create_register_cache.
6798 (clear_inferiors): Call free_register_cache.
6799 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6800 * regcache.c (struct inferior_regcache_data): New.
6801 (registers): Remove.
6802 (get_regcache): New function.
6803 (create_register_cache, free_register_cache): New functions.
6804 (set_register_cache): Don't initialize the register cache here.
6805 (registers_to_string, registers_from_string, register_data): Call
6806 get_regcache.
6807 * regcache.h: Add prototypes.
6808 * server.h: Likewise.
6809
68102002-04-20 Daniel Jacobowitz <drow@mvista.com>
6811
6812 * mem-break.c: New file.
6813 * mem-break.h: New file.
6814 * Makefile.in: Add mem-break.o rule; update server.h
6815 dependencies.
6816 * inferiors.c (struct inferior_info): Add target_data
6817 member.
6818 (clear_inferiors): Free target_data member if set.
6819 (inferior_target_data, set_inferior_target_data): New functions.
6820 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6821 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6822 * linux-low.c (linux_bp_reinsert): New variable.
6823 (struct inferior_linux_data): New.
6824 (linux_create_inferior): Use set_inferior_target_data.
6825 (linux_attach): Likewise. Call add_inferior.
6826 (linux_wait_for_one_inferior): New function.
6827 (linux_wait): Call it.
6828 (linux_write_memory): Add const.
6829 (initialize_low): Call set_breakpoint_data.
6830 * linux-low.h (struct linux_target_ops): Add breakpoint
6831 handling members.
6832 * server.c (attach_inferior): Remove extra add_inferior
6833 call.
6834 * server.h: Include mem-break.h. Update inferior.c
6835 prototypes.
6836 * target.c (read_inferior_memory)
6837 (write_inferior_memory): New functions.
6838 * target.h (read_inferior_memory)
6839 (write_inferior_memory): Change macros to prototypes.
6840 (struct target_ops): Update comments. Add const to write_memory
6841 definition.
6842
68432002-04-11 Daniel Jacobowitz <drow@mvista.com>
6844
6845 * linux-low.c (usr_store_inferior_registers): Support
6846 registers which are allowed to fail to store.
6847 * linux-low.h (linux_target_ops): Likewise.
6848 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6849 (ppc_cannot_store_register): FPSCR may not be storable.
6850
68512002-04-09 Daniel Jacobowitz <drow@mvista.com>
6852
6853 * server.h: Include <string.h> if HAVE_STRING_H.
6854 * ChangeLog: Correct paths in last ChangeLog entry.
6855
68562002-04-09 Daniel Jacobowitz <drow@mvista.com>
6857
6858 * linux-low.h: Remove obsolete prototypes.
6859 (struct linux_target_ops): New.
6860 (extern the_low_target): New.
6861 * linux-low.c (num_regs, regmap): Remove declarations.
6862 (register_addr): Use the_low_target explicitly.
6863 (fetch_register): Likewise.
6864 (usr_fetch_inferior_registers): Likewise.
6865 (usr_store_inferior_registers): Likewise.
6866 * linux-arm-low.c (num_regs): Remove.
6867 (arm_num_regs): Define.
6868 (arm_regmap): Renamed from regmap, made static.
6869 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6870 made static.
6871 (arm_cannot_store_register): Renamed from cannot_store_register,
6872 made static.
6873 (the_low_target): New.
6874 * linux-i386-low.c (num_regs): Remove.
6875 (i386_num_regs): Define.
6876 (i386_regmap): Renamed from regmap, made static.
6877 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6878 made static.
6879 (i386_cannot_store_register): Renamed from cannot_store_register,
6880 made static.
6881 (the_low_target): New.
6882 * linux-ia64-low.c (num_regs): Remove.
6883 (ia64_num_regs): Define.
6884 (ia64_regmap): Renamed from regmap, made static.
6885 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6886 made static.
6887 (ia64_cannot_store_register): Renamed from cannot_store_register,
6888 made static.
6889 (the_low_target): New.
6890 * linux-m68k-low.c (num_regs): Remove.
6891 (m68k_num_regs): Define.
6892 (m68k_regmap): Renamed from regmap, made static.
6893 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6894 made static.
6895 (m68k_cannot_store_register): Renamed from cannot_store_register,
6896 made static.
6897 (the_low_target): New.
6898 * linux-mips-low.c (num_regs): Remove.
6899 (mips_num_regs): Define.
6900 (mips_regmap): Renamed from regmap, made static.
6901 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6902 made static.
6903 (mips_cannot_store_register): Renamed from cannot_store_register,
6904 made static.
6905 (the_low_target): New.
6906 * linux-ppc-low.c (num_regs): Remove.
6907 (ppc_num_regs): Define.
6908 (ppc_regmap): Renamed from regmap, made static.
6909 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6910 made static.
6911 (ppc_cannot_store_register): Renamed from cannot_store_register,
6912 made static.
6913 (the_low_target): New.
6914 * linux-s390-low.c (num_regs): Remove.
6915 (s390_num_regs): Define.
6916 (s390_regmap): Renamed from regmap, made static.
6917 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6918 made static.
6919 (s390_cannot_store_register): Renamed from cannot_store_register,
6920 made static.
6921 (the_low_target): New.
6922 * linux-sh-low.c (num_regs): Remove.
6923 (sh_num_regs): Define.
6924 (sh_regmap): Renamed from regmap, made static.
6925 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6926 made static.
6927 (sh_cannot_store_register): Renamed from cannot_store_register,
6928 made static.
6929 (the_low_target): New.
6930 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6931 (the_low_target): New.
6932
69332002-04-09 Daniel Jacobowitz <drow@mvista.com>
6934
6935 * Makefile.in: Add stamp-h target.
6936 * configure.in: Create stamp-h.
6937 * configure: Regenerated.
6938
69392002-04-09 Daniel Jacobowitz <drow@mvista.com>
6940
6941 * inferiors.c: New file.
6942 * target.c: New file.
6943 * target.h: New file.
6944 * Makefile.in: Add target.o and inferiors.o. Update
6945 dependencies.
6946 * linux-low.c (inferior_pid): New static variable,
6947 moved from server.c.
6948 (linux_create_inferior): Renamed from create_inferior.
6949 Call add_inferior. Return 0 on success instead of a PID.
6950 (linux_attach): Renamed from myattach.
6951 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6952 (linux_thread_alive): Renamed from mythread_alive.
6953 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6954 child dies.
6955 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6956 (regsets_store_inferior_registers): Correct error message.
6957 Add missing ``return 0''.
6958 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6959 (linux_store_registers): Renamed from store_inferior_registers.
6960 (linux_read_memory): Renamed from read_inferior_memory.
6961 (linux_write_memory): Renamed from write_inferior_memory.
6962 (linux_target_ops): New structure.
6963 (initialize_low): Call set_target_ops ().
6964 * remote-utils.c (unhexify): New function.
6965 (hexify): New function.
6966 (input_interrupt): Send signals to ``signal_pid''.
6967 * server.c (inferior_pid): Remove.
6968 (start_inferior): Update create_inferior call.
6969 (attach_inferior): Call add_inferior.
6970 (handle_query): New function.
6971 (main): Call handle_query for `q' packets.
6972 * server.h: Include "target.h". Remove obsolete prototypes.
6973 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6974
69752002-04-09 Daniel Jacobowitz <drow@mvista.com>
6976
6977 * Makefile.in: Add WARN_CFLAGS. Update configury
6978 dependencies.
6979 * configure.in: Check for <string.h>
6980 * configure: Regenerate.
6981 * config.in: Regenerate.
6982 * gdbreplay.c: Include needed system headers.
6983 (remote_open): Remove strchr prototype.
6984 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6985 * regcache.c (supply_register): Change buf argument to const void *.
6986 (supply_register_by_name): Likewise.
6987 (collect_register): Change buf argument to void *.
6988 (collect_register_by_name): Likewise.
6989 * regcache.h: Add missing prototypes.
6990 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6991 * server.c (handle_query): New function.
6992 (attached): New static variable, moved out of main.
6993 (main): Quiet longjmp clobber warnings.
6994 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6995 * utils.c (error): Remove NORETURN.
6996 (fatal): Likewise.