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