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