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