ae458e22b0e465ba1875a98c934be9cf39ae662f
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * Makefile.in (SFILE): Add "common/job-control.c".
4 (OBS): Add "job-control.o".
5
6 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7
8 * Makefile: Remove "@host_makefile_frag@".
9
10 2017-05-05 Pedro Alves <palves@redhat.com>
11
12 * configure: Regenerate.
13
14 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
15
16 * configure: Regenerate.
17
18 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
21 software_single_step change of return type to
22 std::vector<CORE_ADDR>.
23 * linux-low.c (install_software_single_step_breakpoints):
24 Likewise.
25 * linux-low.h (install_software_single_step_breakpoints):
26 Likewise.
27
28 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
29
30 * remote-utils.c: Include "gdb_termios.h" instead of
31 "terminal.h".
32 * terminal.h: Delete file.
33
34 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
35
36 * server.c: Include <vector>.
37 <program_argv, wrapper_argv>: Convert to std::vector.
38 (start_inferior): Rewrite function to use C++.
39 (handle_v_run): Likewise. Update code that calculates the argv
40 based on the vRun packet; use C++.
41 (captured_main): Likewise.
42
43 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
44
45 * server.c (handle_v_cont): Initialize thread_resume::thread
46 with null_ptid.
47
48 2017-04-05 Pedro Alves <palves@redhat.com>
49
50 * configure: Regenerate.
51
52 2017-04-05 Pedro Alves <palves@redhat.com>
53
54 * gdbreplay.c (sync_error): Constify.
55 * linux-x86-low.c (push_opcode): Constify.
56
57 2017-04-05 Pedro Alves <palves@redhat.com>
58
59 * win32-low.c (get_child_debug_event)
60 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
61 Report TARGET_WAITKIND_SPURIOUS instead.
62
63 2017-04-05 Pedro Alves <palves@redhat.com>
64
65 * remote-utils.c (remote_prepare, remote_open): Constify.
66 * remote-utils.h (remote_prepare, remote_open): Constify.
67 * server.c (captured_main): Constify 'port' handling.
68
69 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
70
71 * Makefile.in (clean): Clear .deps.
72
73 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
74
75 * .gitignore: Remove generated files, replace with wildcard.
76 * (clean): Replace removal of generated files with wildcard.
77 (version.c): Replace with...
78 (version-generated.c): ...this.
79 (xml-builtin.c): Replace with...
80 (xml-builtin-generated.c): ...this.
81 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
82 (%.c: *regformats*): Replace with...
83 (%-generated.c: *regformats*): ...this.
84
85 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
86
87 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
88 (xtensa_fill_gregset): Call collect_register_by_name for
89 threadptr register.
90 (xtensa_store_gregset): Call supply_register_by_name for
91 threadptr register.
92
93 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
94
95 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
96 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
97 (xtensa_store_gregset): Call supply_register for all registers in
98 a0_regnum..a0_regnum + C0_NREGS range.
99
100 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
101
102 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
103 (ax-ipa.o: ax.c): Remove.
104 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
105 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
106 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
107 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
108 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
109
110 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
113 (print-utils-ipa.o: ../common/print-utils.c): Remove.
114 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
115 (errors-ipa.o: ../common/errors.c): Remove.
116 (format-ipa.o: ../common/format.c): Remove.
117 (common-utils-ipa.o: ../common/common-utils.c): Remove.
118
119 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
120
121 * Makefile.in (%-ipa.o: %.c): New rule.
122 (tracepoint-ipa.o: tracepoint.c): Remove.
123 (utils-ipa.o: utils.c): Remove.
124 (remote-utils-ipa.o: remote-utils.c): Remove.
125 (regcache-ipa.o: regcache.c): Remove.
126 (i386-linux-ipa.o: i386-linux.c): Remove.
127 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
128 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
129 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
130 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
131 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
132 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
133 (amd64-linux-ipa.o: amd64-linux.c): Remove.
134 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
135 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
136 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
137 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
138 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
139 (aarch64-ipa.o: aarch64.c): Remove.
140 (s390-linux32-ipa.o: s390-linux32.c): Remove.
141 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
142 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
143 (s390-linux64-ipa.o: s390-linux64.c): Remove.
144 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
145 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
146 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
147 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
148 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
149 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
150 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
151 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
152 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
153 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
154 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
155 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
156 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
157 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
158 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
159 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
160 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
161 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
162 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
163 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
164 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
165 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
166 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
167 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
168 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
169 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
170 (tdesc-ipa.o: tdesc.c): Remove.
171 (x32-linux-ipa.o: x32-linux.c): Remove.
172 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
173 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
174
175 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
176
177 * Makefile.in (%.o: ../arch/%.c): New rule.
178 (arm.o: ../arch/arm.c): Remove.
179 (arm-linux.o: ../arch/arm-linux.c): Remove.
180 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
181 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
182
183 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
184
185 * Makefile.in (%.o: ../nat/%.c): New rule.
186 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
187 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
188 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
189 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
190 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
191 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
192 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
193 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
194 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
195 (linux-personality.o: ../nat/linux-personality.c): Remove.
196 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
197 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
198 (x86-linux.o: ../nat/x86-linux.c): Remove.
199 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
200 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
201
202 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
203
204 * Makefile.in (%.o: ../common/%.c): New rule.
205 (signals.o: ../common/signals.c): Remove.
206 (print-utils.o: ../common/print-utils.c): Remove.
207 (rsp-low.o: ../common/rsp-low.c): Remove.
208 (common-utils.o: ../common/common-utils.c): Remove.
209 (posix-strerror.o: ../common/posix-strerror.c): Remove.
210 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
211 (vec.o: ../common/vec.c): Remove.
212 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
213 (xml-utils.o: ../common/xml-utils.c): Remove.
214 (ptid.o: ../common/ptid.c): Remove.
215 (buffer.o: ../common/buffer.c): Remove.
216 (format.o: ../common/format.c): Remove.
217 (filestuff.o: ../common/filestuff.c): Remove.
218 (agent.o: ../common/agent.c): Remove.
219 (errors.o: ../common/errors.c): Remove.
220 (environ.o: ../common/environ.c): Remove.
221 (common-debug.o: ../common/common-debug.c): Remove.
222 (cleanups.o: ../common/cleanups.c): Remove.
223 (common-exceptions.o: ../common/common-exceptions.c): Remove.
224 (fileio.o: ../common/fileio.c): Remove.
225 (common-regcache.o: ../common/common-regcache.c): Remove.
226 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
227 (new-op.o: ../common/new-op.c): Remove.
228 (btrace-common.o: ../common/btrace-common.c): Remove.
229
230 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
231
232 * Makefile.in (%.o: ../target/%.c): New rule.
233 (waitstatus.o: ../target/waitstatus.c): Remove.
234
235 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
236
237 * Makefile.in
238 (%.c: ../regformats/%.dat,
239 (%.c: ../regformats/arm/%.dat,
240 (%.c: ../regformats/i386/%.dat,
241 (%.c: ../regformats/rs6000/%.dat): New rules.
242 (aarch64.c): Remove.
243 (reg-arm.c): Remove.
244 (arm-with-iwmmxt.c): Remove.
245 (arm-with-vfpv2.c): Remove.
246 (arm-with-vfpv3.c): Remove.
247 (arm-with-neon.c): Remove.
248 (reg-bfin.c): Remove.
249 (reg-cris.c): Remove.
250 (reg-crisv32.c): Remove.
251 (i386.c): Remove.
252 (i386-linux.c): Remove.
253 (i386-avx.c): Remove.
254 (i386-avx-linux.c): Remove.
255 (i386-avx-avx512.c): Remove.
256 (i386-avx-avx512-linux.c): Remove.
257 (i386-mpx.c): Remove.
258 (i386-mpx-linux.c): Remove.
259 (i386-avx-mpx-avx512-pku.c): Remove.
260 (i386-avx-mpx-avx512-pku-linux.c): Remove.
261 (i386-avx-mpx.c): Remove.
262 (i386-avx-mpx-linux.c): Remove.
263 (i386-mmx.c): Remove.
264 (i386-mmx-linux.c): Remove.
265 (reg-ia64.c): Remove.
266 (reg-m32r.c): Remove.
267 (reg-m68k.c): Remove.
268 (reg-cf.c): Remove.
269 (mips-linux.c): Remove.
270 (mips-dsp-linux.c): Remove.
271 (mips64-linux.c): Remove.
272 (mips64-dsp-linux.c): Remove.
273 (nios2-linux.c): Remove.
274 (powerpc-32.c): Remove.
275 (powerpc-32l.c): Remove.
276 (powerpc-altivec32l.c): Remove.
277 (powerpc-cell32l.c): Remove.
278 (powerpc-vsx32l.c): Remove.
279 (powerpc-isa205-32l.c): Remove.
280 (powerpc-isa205-altivec32l.c): Remove.
281 (powerpc-isa205-vsx32l.c): Remove.
282 (powerpc-e500l.c): Remove.
283 (powerpc-64l.c): Remove.
284 (powerpc-altivec64l.c): Remove.
285 (powerpc-cell64l.c): Remove.
286 (powerpc-vsx64l.c): Remove.
287 (powerpc-isa205-64l.c): Remove.
288 (powerpc-isa205-altivec64l.c): Remove.
289 (powerpc-isa205-vsx64l.c): Remove.
290 (s390-linux32.c): Remove.
291 (s390-linux32v1.c): Remove.
292 (s390-linux32v2.c): Remove.
293 (s390-linux64.c): Remove.
294 (s390-linux64v1.c): Remove.
295 (s390-linux64v2.c): Remove.
296 (s390-te-linux64.c): Remove.
297 (s390-vx-linux64.c): Remove.
298 (s390-tevx-linux64.c): Remove.
299 (s390x-linux64.c): Remove.
300 (s390x-linux64v1.c): Remove.
301 (s390x-linux64v2.c): Remove.
302 (s390x-te-linux64.c): Remove.
303 (s390x-vx-linux64.c): Remove.
304 (s390x-tevx-linux64.c): Remove.
305 (tic6x-c64xp-linux.c): Remove.
306 (tic6x-c64x-linux.c): Remove.
307 (tic6x-c62x-linux.c): Remove.
308 (reg-sh.c): Remove.
309 (reg-sparc64.c): Remove.
310 (reg-spu.c): Remove.
311 (amd64.c): Remove.
312 (amd64-linux.c): Remove.
313 (amd64-avx.c): Remove.
314 (amd64-avx-linux.c): Remove.
315 (amd64-avx-avx512.c): Remove.
316 (amd64-avx-avx512-linux.c): Remove.
317 (amd64-mpx.c): Remove.
318 (amd64-mpx-linux.c): Remove.
319 (amd64-avx-mpx-avx512-pku.c): Remove.
320 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
321 (amd64-avx-mpx.c): Remove.
322 (amd64-avx-mpx-linux.c): Remove.
323 (x32.c): Remove.
324 (x32-linux.c): Remove.
325 (x32-avx.c): Remove.
326 (x32-avx-linux.c): Remove.
327 (x32-avx-avx512.c): Remove.
328 (x32-avx-avx512-linux.c): Remove.
329 (reg-xtensa.c): Remove.
330 (reg-tilegx.c): Remove.
331 (reg-tilegx32.c): Remove.
332
333 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
334
335 * Makefile.in (SFILES): Add "common/environ.c".
336 (OBJS): Add "common/environ.h".
337
338 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
339
340 * configure.ac: Check if the fs_base and gs_base members of
341 `struct user_regs_struct' exist.
342 * config.in: Regenerated.
343 * configure: Likewise.
344
345 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
346
347 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
348 target_read_memory.
349 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
350 (get_next_pcs_syscall_next_pc): Likewise.
351
352 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
353
354 * win32-i386-low.c: Fix incorrect reference to a couple source files.
355 * nto-x86-low.c: Likewise.
356
357 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * Makefile.in: Include disable-implicit-rules.mk.
360
361 2016-11-23 Pedro Alves <palves@redhat.com>
362
363 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
364 (debug_vprintf): Use std::chrono::steady_clock instead of
365 gettimeofday. Use '.' instead of ':'.
366 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
367 (get_timestamp): Use std::chrono::steady_clock instead of
368 gettimeofday.
369
370 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
371
372 * Makefile.in: Fix whitespace formatting.
373
374 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
375
376 * Makefile.in (SFILES, OBS): Flatten list and order
377 alphabetically.
378
379 2016-11-23 Pedro Alves <palves@redhat.com>
380
381 * event-loop.c (handle_file_event): Use warning.
382 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
383 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
384 Use warning.
385
386 2016-11-23 Pedro Alves <palves@redhat.com>
387
388 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
389 output.
390 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
391 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
392 debug_printf and debug_flush for debug output.
393 * server.c (handle_general_set): Likewise.
394 * thread-db.c (try_thread_db_load): Use debug_printf for debug
395 output.
396
397 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * Makefile.in (.c.o): Replace rule with ...
400 (%.o: %.c): ... this one.
401
402 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
403
404 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
405 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
406 make.
407 * configure.ac: Remove checks for the make program.
408 * configure: Re-generate.
409
410 2016-10-28 Pedro Alves <palves@redhat.com>
411
412 * Makefile.in (CXX_DIALECT): Get from configure.
413 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
414 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
415 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
416 * config.in: Regenerate.
417 * configure: Regenerate.
418
419 2016-10-27 Yao Qi <yao.qi@linaro.org>
420
421 * linux-low.c (linux_supports_range_stepping): Return true if
422 can_software_single_step return true.
423
424 2016-10-27 Yao Qi <yao.qi@linaro.org>
425
426 * inferiors.c (find_inferior_in_random): New function.
427 * inferiors.h (find_inferior_in_random): Declare.
428 * linux-low.c (linux_wait_for_event_filtered): Call
429 find_inferior_in_random instead of find_inferior.
430
431 2016-10-27 Yao Qi <yao.qi@linaro.org>
432
433 * linux-low.c (linux_wait_1): If single-step breakpoints are
434 inserted, remove them.
435
436 2016-10-26 Pedro Alves <palves@redhat.com>
437
438 * linux-low.c (handle_extended_wait): Link parent/child fork
439 threads.
440 (linux_wait_1): Unlink them.
441 (linux_set_resume_request): Ignore resume requests for
442 already-resumed and unhandled fork child threads.
443 * linux-low.h (struct lwp_info) <fork_relative>: New field.
444 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
445 New functions.
446 (handle_v_requests) <vCont>: Don't call require_running.
447 * server.h (in_queued_stop_replies): New declaration.
448
449 2016-10-24 Yao Qi <yao.qi@linaro.org>
450
451 PR server/20733
452 * linux-aarch64-low.c (append_insns): Cast the return value to
453 'uint32_t *'.
454
455 2016-10-10 Yao Qi <yao.qi@linaro.org>
456
457 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
458
459 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
460
461 * target.c (target_supports_multi_process): New function, moved
462 from...
463 * target.h (target_supports_multi_process): ... here. Remove
464 macro.
465
466 2016-10-05 Tom Tromey <tom@tromey.com>
467
468 PR remote/20655:
469 * tracepoint.c (handle_tracepoint_bkpts): Check
470 ipa_error_tracepoint, not ipa_stopping_tracepoint.
471
472 2016-10-05 Yao Qi <yao.qi@linaro.org>
473
474 * configure.srv: Update the path of arm-*.xml files.
475
476 2016-10-05 Terry Guo <terry.guo@arm.com>
477 Yao Qi <yao.qi@linaro.org>
478
479 * Makefile.in: Adjust the path of rules.
480 * configure.srv: Update the path of xml files.
481 * regformats/arm-with-iwmmxt.dat: Regenerated.
482 * regformats/arm-with-neon.dat: Likewise.
483 * regformats/arm-with-vfpv2.dat: Likewise.
484 * regformats/arm-with-vfpv3.dat Likewise.
485
486 2016-09-30 Yao Qi <yao.qi@linaro.org>
487
488 PR gdbserver/20627
489 * target.c (target_stop_and_wait): Don't call
490 target_continue_no_signal, use resume_stop instead.
491
492 2016-09-26 Yao Qi <yao.qi@linaro.org>
493
494 * linux-low.c (linux_wait_1): Call debug_exit.
495
496 2016-09-23 Pedro Alves <palves@redhat.com>
497
498 * Makefile.in (SFILES): Add common/new-op.c.
499 (OBS): Add common/new-op.o.
500 (new-op.o): New rule.
501
502 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
503
504 * .gitinore: Ignore more files.
505
506 2016-09-21 Yao Qi <yao.qi@linaro.org>
507
508 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
509 23.
510
511 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
512
513 * server.c (start_inferior): Call target_mourn_inferior instead of
514 mourn_inferior; pass ptid_t argument to it.
515 (resume): Likewise.
516 (handle_target_event): Likewise.
517 * target.c (target_mourn_inferior): New function.
518 * target.h (mourn_inferior): Delete macro.
519
520 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
521
522 * linux-low.c (lwp_is_stepping): New function.
523
524 2016-09-06 Carl Love <cel@us.ibm.com>
525
526 * server.c (start_inferior): Fixed comment, requested comment change
527 didn't get updated correctly. Removed reference to ptrace () call as
528 it is only true on Linux systems.
529
530 2016-09-06 Carl Love <cel@us.ibm.com>
531
532 * server.c (start_inferior): Do not call
533 function target_post_create_inferior () if the
534 inferior process has already exited.
535
536 2016-09-05 Pedro Alves <palves@redhat.com>
537
538 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
539 (COMPILE.pre, CC_LD): Use CXX directly.
540 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
541 * acinclude.m4: Don't include build-with-cxx.m4.
542 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
543 * configure: Regenerate.
544
545 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
546
547 PR gdb/19495
548 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
549 call writing data to own_buf.
550
551 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
552
553 * target.c (mywait): Call target_wait instead of
554 the_target->wait.
555 (target_wait): New function.
556
557 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
558
559 * server.c (start_inferior): New variable 'ptid'. Replace calls
560 to the_target->resume by target_continue{,_no_signal}, depending
561 on the case.
562 * target.c (target_stop_and_wait): Call target_continue_no_signal
563 instead of the_target->resume.
564 (target_continue): New function.
565
566 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
567
568 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
569
570 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
571
572 PR server/20491
573 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
574 ps_prochandle.
575 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
576 * linux-arm-low.c (ps_get_thread_area): Likewise.
577 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
578 * linux-m68k-low.c (ps_get_thread_area): Likewise.
579 * linux-mips-low.c (ps_get_thread_area): Likewise.
580 * linux-nios2-low.c (ps_get_thread_area): Likewise.
581 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
582 * linux-x86-low.c (ps_get_thread_area): Likewise.
583 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
584
585 2016-08-19 Pedro Alves <palves@redhat.com>
586
587 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
588
589 2016-08-19 Pedro Alves <palves@redhat.com>
590
591 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
592 comment. Use memcpy instead of casting through unsigned long.
593
594 2016-08-19 Pedro Alves <palves@redhat.com>
595
596 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
597 allocating around 0x80000000.
598
599 2016-08-19 Pedro Alves <palves@redhat.com>
600
601 PR gdb/20415
602 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
603 (x32-avx512-linux-ipa.o): New rules.
604 * configure.ac (x86_64-*-linux*): New x32 check.
605 * configure.srv (ipa_x32_linux_regobj): New.
606 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
607 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
608 descriptions.
609 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
610 descriptions.
611 * configure: Regenerate.
612
613 2016-08-09 Pedro Alves <palves@redhat.com>
614
615 PR gdb/18653
616 * Makefile.in (OBS): Add signals-state-save-restore.o.
617 (signals-state-save-restore.o): New rule.
618 * config.in: Regenerate.
619 * configure: Regenerate.
620 * linux-low.c: Include "signals-state-save-restore.h".
621 (linux_create_inferior): Call
622 restore_original_signals_state.
623 * server.c: Include "dispositions-save-restore.h".
624 (captured_main): Call save_original_signals_state.
625
626 2016-08-05 Pedro Alves <palves@redhat.com>
627
628 * configure: Regenerate.
629
630 2016-08-04 Yao Qi <yao.qi@linaro.org>
631
632 * linux-low.c (regsets_fetch_inferior_registers): Check
633 errno is ESRCH or not.
634
635 2016-08-02 Yao Qi <yao.qi@linaro.org>
636
637 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
638 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
639 (thread_db_load_search): Update.
640 (try_thread_db_load_1): Don't look for td_ta_event_addr,
641 td_ta_set_event and td_ta_event_getmsg.
642
643 2016-07-26 Pedro Alves <palves@redhat.com>
644
645 PR server/20414
646 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
647 of unsigned long for 64-bit registers and use uint32_t instead of
648 unsigned int for 32-bit registers.
649
650 2016-07-26 Pedro Alves <palves@redhat.com>
651
652 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
653 to 'ptrace'.
654
655 2016-07-21 Tom Tromey <tom@tromey.com>
656
657 * configure: Rebuild.
658
659 2016-07-21 Yao Qi <yao.qi@linaro.org>
660
661 * mem-break.c (find_gdb_breakpoint): Cast bp to
662 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
663
664 2016-07-21 Yao Qi <yao.qi@linaro.org>
665
666 * server.c (handle_v_requests): Support s and S actions
667 if target_supports_software_single_step return true.
668
669 2016-07-21 Yao Qi <yao.qi@linaro.org>
670
671 * linux-low.c (resume_stopped_resumed_lwps): If resume request
672 is resume_step, call maybe_hw_step.
673 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
674 and unstop them.
675 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
676 breakpoints or not.
677 (proceed_one_lwp): If resume request is resume_step, install
678 reinsert breakpoints and call maybe_hw_step.
679
680 2016-07-21 Yao Qi <yao.qi@linaro.org>
681
682 * linux-low.c (proceed_one_lwp): Declare.
683 (linux_resume_one_thread): Remove local variable 'step'.
684 Lift code enqueue signal. Call proceed_one_lwp instead of
685 linux_resume_one_lwp.
686
687 2016-07-21 Yao Qi <yao.qi@linaro.org>
688
689 * linux-low.c (linux_resume_one_thread): Call
690 enqueue_pending_signal.
691
692 2016-07-21 Yao Qi <yao.qi@linaro.org>
693
694 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
695 * inferiors.c (do_restore_current_thread_cleanup): New function.
696 (make_cleanup_restore_current_thread): Likewise.
697 * linux-low.c (install_software_single_step_breakpoints): Call
698 make_cleanup_restore_current_thread. Switch current_thread to
699 thread.
700
701 2016-07-21 Yao Qi <yao.qi@linaro.org>
702
703 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
704 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
705 (clone_one_breakpoint): Likewise.
706 (delete_reinsert_breakpoints): Change parameter to thread.
707 Callers updated.
708 (has_reinsert_breakpoints): Likewise.
709 (uninsert_reinsert_breakpoints): Likewise.
710 (reinsert_reinsert_breakpoints): Likewise.
711 * mem-break.h (set_reinsert_breakpoint): Update declaration.
712 (delete_reinsert_breakpoints): Likewise.
713 (reinsert_reinsert_breakpoints): Likewise.
714 (uninsert_reinsert_breakpoints): Likewise.
715 (has_reinsert_breakpoints): Likewise.
716
717 2016-07-21 Yao Qi <yao.qi@linaro.org>
718
719 * inferiors.c (get_thread_process): Make parameter const.
720 * inferiors.h (get_thread_process): Update declaration.
721 * mem-break.c (clone_all_breakpoints): Remove all parameters.
722 Add new parameters child_thread and parent_thread. Callers
723 updated.
724 * mem-break.h (clone_all_breakpoints): Update declaration.
725
726 2016-07-21 Yao Qi <yao.qi@linaro.org>
727
728 * mem-break.c (struct breakpoint) <cond_list>: Remove.
729 <command_list, handler>: Remove.
730 (struct gdb_breakpoint): New.
731 (struct other_breakpoint): New.
732 (struct reinsert_breakpoint): New.
733 (is_gdb_breakpoint): New function.
734 (any_persistent_commands): Update command_list if
735 is_gdb_breakpoint returns true.
736 (set_breakpoint): Create breakpoints according to their types.
737 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
738 (set_gdb_breakpoint_1): Likewise.
739 (set_gdb_breakpoint): Likewise.
740 (clear_breakpoint_conditions): Change parameter type to
741 'struct gdb_breakpoint *'.
742 (clear_breakpoint_commands): Likewise.
743 (clear_breakpoint_conditions_and_commands): Likewise.
744 (add_condition_to_breakpoint): Likewise.
745 (add_breakpoint_condition): Likewise.
746 (add_commands_to_breakpoint): Likewise.
747 (check_breakpoints): Check other_breakpoint.
748 (clone_one_breakpoint): Clone breakpopint according to its type.
749 * mem-break.h (struct gdb_breakpoint): Declare.
750 (set_gdb_breakpoint): Update declaration.
751 (clear_breakpoint_conditions_and_commands): Likewise.
752 (add_breakpoint_condition): Likewise.
753 (add_breakpoint_commands): Likewise.
754 * server.c (process_point_options): Change parameter type to
755 'struct gdb_breakpoint *'.
756
757 2016-07-21 Yao Qi <yao.qi@linaro.org>
758
759 * mem-break.c (set_breakpoint_at): Rename it to ...
760 (set_breakpoint_type_at): ... it.
761 (set_breakpoint_at): Call set_breakpoint_type_at.
762 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
763 * mem-break.h (set_breakpoint_at): Update comments.
764
765 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
766
767 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
768 to buf parameter.
769 (nios2_store_gregset): Likewise.
770
771 2016-07-01 Pedro Alves <palves@redhat.com>
772 Antoine Tremblay <antoine.tremblay@ericsson.com>
773
774 * linux-low.c: Change interface to take the target lwp_info
775 pointer directly and return void. Handle detaching from a zombie
776 thread.
777 (linux_detach_lwp_callback): New function.
778 (linux_detach): Detach from the leader thread after detaching from
779 the clone threads.
780
781 2016-06-28 Yao Qi <yao.qi@linaro.org>
782
783 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
784 for variable new_offset.
785 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
786 (aarch64_ftrace_insn_reloc_cb): Likewise.
787 (aarch64_ftrace_insn_reloc_tb): Likewise.
788 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
789 PRIx64 instead of PRIx32.
790
791 2016-06-28 Yao Qi <yao.qi@linaro.org>
792
793 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
794 (the_low_target): Install arm_get_syscall_trapinfo.
795
796 2016-06-28 Yao Qi <yao.qi@linaro.org>
797
798 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
799 function.
800 (the_low_target): Install aarch64_get_syscall_trapinfo.
801
802 2016-06-28 Yao Qi <yao.qi@linaro.org>
803
804 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
805 Callers updated.
806 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
807 Remove parameter sysno.
808 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
809 sysret.
810
811 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
812
813 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
814 (s390_emit_ne_goto): Likewise.
815 (s390_emit_lt_goto): Likewise.
816 (s390_emit_le_goto): Likewise.
817 (s390_emit_gt_goto): Likewise.
818 (s390_emit_ge_goto): Likewise.
819 (s390x_emit_eq_goto): Likewise.
820 (s390x_emit_ne_goto): Likewise.
821 (s390x_emit_lt_goto): Likewise.
822 (s390x_emit_le_goto): Likewise.
823 (s390x_emit_gt_goto): Likewise.
824 (s390x_emit_ge_goto): Likewise.
825 (s390_emit_ops_impl): Mark variable static.
826 (s390x_emit_ops): Likewise.
827
828 2016-06-17 Yao Qi <yao.qi@linaro.org>
829
830 * linux-low.c (handle_extended_wait): Call
831 uninsert_reinsert_breakpoints for the parent process. Remove
832 reinsert breakpoints from the child process. Reinsert them to
833 the parent process when vfork is done.
834 * mem-break.c (uninsert_reinsert_breakpoints): New function.
835 (reinsert_reinsert_breakpoints): New function.
836 * mem-break.h (uninsert_reinsert_breakpoints): Declare
837 (reinsert_reinsert_breakpoints): Declare.
838
839 2016-06-17 Yao Qi <yao.qi@linaro.org>
840
841 * linux-low.c (handle_extended_wait): If the parent is doing
842 step-over, remove the reinsert breakpoints from the forked child.
843
844 2016-06-17 Yao Qi <yao.qi@linaro.org>
845
846 * linux-low.c (unsuspend_all_lwps): Declare.
847 (linux_low_filter_event): If thread exited, call finish_step_over.
848 If step-over is finished, unsuspend other threads.
849
850 2016-06-17 Yao Qi <yao.qi@linaro.org>
851
852 * linux-low.c (linux_resume_one_lwp_throw): Assert
853 has_reinsert_breakpoints returns false.
854 * mem-break.c (delete_disabled_breakpoints): Assert
855 bp type isn't reinsert_breakpoint.
856
857 2016-06-17 Yao Qi <yao.qi@linaro.org>
858
859 * linux-low.c (maybe_hw_step): New function.
860 (linux_resume_one_lwp_throw): Call maybe_hw_step.
861 (finish_step_over): Switch current_thread to lwp temporarily,
862 and assert has_reinsert_breakpoints returns true.
863 (proceed_one_lwp): Call maybe_hw_step.
864 * mem-break.c (has_reinsert_breakpoints): New function.
865 * mem-break.h (has_reinsert_breakpoints): Declare.
866
867 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
868
869 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
870
871 2016-05-17 Yao Qi <yao.qi@linaro.org>
872
873 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
874 instead of find_inferior.
875
876 2016-05-05 Yao Qi <yao.qi@linaro.org>
877
878 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
879 Initialize res to zero.
880
881 2016-05-05 Yao Qi <yao.qi@linaro.org>
882
883 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
884 to uint32_t.
885
886 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
887
888 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
889 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
890 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
891
892 2016-04-28 Par Olsson <par.olsson@windriver.com>
893 Simon Marchi <simon.marchi@ericsson.com>
894
895 * tracepoint.c (write_inferior_int8): New function.
896 (cmd_qtenable_disable): Write enable flag using
897 write_inferior_int8.
898
899 2016-04-25 Yao Qi <yao.qi@linaro.org>
900
901 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
902 (need_step_over_p): Return zero if the LWP has pending signals
903 can be delivered on software single step target.
904
905 2016-04-25 Yao Qi <yao.qi@linaro.org>
906
907 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
908 return instead of error.
909
910 2016-04-22 Yao Qi <yao.qi@linaro.org>
911
912 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
913 to 23.
914
915 2016-04-22 Yao Qi <yao.qi@linaro.org>
916
917 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
918 signal when stepping over breakpoint with software single
919 step.
920
921 2016-04-21 Pedro Alves <palves@redhat.com>
922
923 * linux-s390-low.c (s390_collect_ptrace_register)
924 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
925 add casts.
926 (s390_check_regset): Use void * instead of gdb_byte *.
927
928 2016-04-20 Pedro Alves <palves@redhat.com>
929
930 * configure: Renegerate.
931
932 2016-04-20 Yao Qi <yao.qi@linaro.org>
933
934 * linux-aarch32-low.c: Include "arch/arm-linux.h".
935 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
936 number 16.
937 (arm_store_gregset): Likewise.
938
939 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
940
941 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
942 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
943 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
944 (amd64-avx-mpx-linux.c): New rules.
945 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
946 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
947 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
948 (srv_amd64_regobj): Add amd64-avx-mpx.o.
949 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
950 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
951 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
952 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
953 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
954 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
955 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
956 * linux-x86-low.c (x86_linux_read_description): Add case for
957 X86_XSTATE_AVX_MPX_MASK.
958 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
959 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
960 init_registers_i386_avx_mpx_linux.
961 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
962 (initialize_low_tracepoint): Call
963 init_registers_i386_avx_mpx_linux.
964 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
965 (initialize_low_tracepoint): Call
966 init_registers_amd64_avx_mpx_linux.
967 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
968 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
969 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
970 declarations.
971
972 2016-04-18 Pedro Alves <palves@redhat.com>
973
974 * configure: Regenerate.
975
976 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
977
978 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
979 (aarch64_emit_sub): Likewise.
980
981 2016-04-12 Pedro Alves <palves@redhat.com>
982
983 * utils.c (prepare_to_throw_exception): Delete.
984
985 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
986
987 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
988
989 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
990
991 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
992
993 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
994
995 * linux-aarch64-ipa.c: Add <elf.h> include.
996 * linux-ppc-ipa.c: Add <elf.h> include.
997 * linux-s390-ipa.c: Add <elf.h> include.
998
999 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1000
1001 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1002 (get_raw_reg_ptr): Likewise.
1003 (get_trace_state_variable_value_ptr): Likewise.
1004 (set_trace_state_variable_value_ptr): Likewise.
1005 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1006 char *.
1007
1008 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1009 Marcin Kościelnicki <koriakin@0x04.net>
1010
1011 PR/17221
1012 * linux-ppc-low.c (emit_insns): New function.
1013 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1014 (ppc_emit_prologue): New function.
1015 (ppc_emit_epilogue): New function.
1016 (ppc_emit_add): New function.
1017 (ppc_emit_sub): New function.
1018 (ppc_emit_mul): New function.
1019 (ppc_emit_lsh): New function.
1020 (ppc_emit_rsh_signed): New function.
1021 (ppc_emit_rsh_unsigned): New function.
1022 (ppc_emit_ext): New function.
1023 (ppc_emit_zero_ext): New function.
1024 (ppc_emit_log_not): New function.
1025 (ppc_emit_bit_and): New function.
1026 (ppc_emit_bit_or): New function.
1027 (ppc_emit_bit_xor): New function.
1028 (ppc_emit_bit_not): New function.
1029 (ppc_emit_equal): New function.
1030 (ppc_emit_less_signed): New function.
1031 (ppc_emit_less_unsigned): New function.
1032 (ppc_emit_ref): New function.
1033 (ppc_emit_const): New function.
1034 (ppc_emit_reg): New function.
1035 (ppc_emit_pop): New function.
1036 (ppc_emit_stack_flush): New function.
1037 (ppc_emit_swap): New function.
1038 (ppc_emit_stack_adjust): New function.
1039 (ppc_emit_call): New function.
1040 (ppc_emit_int_call_1): New function.
1041 (ppc_emit_void_call_2): New function.
1042 (ppc_emit_if_goto): New function.
1043 (ppc_emit_goto): New function.
1044 (ppc_emit_eq_goto): New function.
1045 (ppc_emit_ne_goto): New function.
1046 (ppc_emit_lt_goto): New function.
1047 (ppc_emit_le_goto): New function.
1048 (ppc_emit_gt_goto): New function.
1049 (ppc_emit_ge_goto): New function.
1050 (ppc_write_goto_address): New function.
1051 (ppc_emit_ops_impl): New static variable.
1052 (ppc64v1_emit_prologue): New function.
1053 (ppc64v2_emit_prologue): New function.
1054 (ppc64_emit_epilogue): New function.
1055 (ppc64_emit_add): New function.
1056 (ppc64_emit_sub): New function.
1057 (ppc64_emit_mul): New function.
1058 (ppc64_emit_lsh): New function.
1059 (ppc64_emit_rsh_signed): New function.
1060 (ppc64_emit_rsh_unsigned): New function.
1061 (ppc64_emit_ext): New function.
1062 (ppc64_emit_zero_ext): New function.
1063 (ppc64_emit_log_not): New function.
1064 (ppc64_emit_bit_and): New function.
1065 (ppc64_emit_bit_or): New function.
1066 (ppc64_emit_bit_xor): New function.
1067 (ppc64_emit_bit_not): New function.
1068 (ppc64_emit_equal): New function.
1069 (ppc64_emit_less_signed): New function.
1070 (ppc64_emit_less_unsigned): New function.
1071 (ppc64_emit_ref): New function.
1072 (ppc64_emit_const): New function.
1073 (ppc64v1_emit_reg): New function.
1074 (ppc64v2_emit_reg): New function.
1075 (ppc64_emit_pop): New function.
1076 (ppc64_emit_stack_flush): New function.
1077 (ppc64_emit_swap): New function.
1078 (ppc64v1_emit_call): New function.
1079 (ppc64v2_emit_call): New function.
1080 (ppc64v1_emit_int_call_1): New function.
1081 (ppc64v2_emit_int_call_1): New function.
1082 (ppc64v1_emit_void_call_2): New function.
1083 (ppc64v2_emit_void_call_2): New function.
1084 (ppc64_emit_if_goto): New function.
1085 (ppc64_emit_eq_goto): New function.
1086 (ppc64_emit_ne_goto): New function.
1087 (ppc64_emit_lt_goto): New function.
1088 (ppc64_emit_le_goto): New function.
1089 (ppc64_emit_gt_goto): New function.
1090 (ppc64_emit_ge_goto): New function.
1091 (ppc64v1_emit_ops_impl): New static variable.
1092 (ppc64v2_emit_ops_impl): New static variable.
1093 (ppc_emit_ops): New function.
1094 (linux_low_target): Wire in ppc_emit_ops.
1095
1096 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1097 Marcin Kościelnicki <koriakin@0x04.net>
1098
1099 PR/17221
1100 * Makefile.in: Add powerpc-*-ipa.o
1101 * configure.srv: Add ipa_obj for powerpc*-linux.
1102 * linux-ppc-ipa.c: New file.
1103 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1104 includes.
1105 (PPC_FIELD): New macro.
1106 (PPC_SEXT): New macro.
1107 (PPC_OP6): New macro.
1108 (PPC_BO): New macro.
1109 (PPC_LI): New macro.
1110 (PPC_BD): New macro.
1111 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1112 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1113 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1114 (ppc_get_thread_area): New function.
1115 (is_elfv2_inferior): New function.
1116 (gen_ds_form): New function.
1117 (GEN_STD): New macro.
1118 (GEN_STDU): New macro.
1119 (GEN_LD): New macro.
1120 (GEN_LDU): New macro.
1121 (gen_d_form): New function.
1122 (GEN_ADDI): New macro.
1123 (GEN_ADDIS): New macro.
1124 (GEN_LI): New macro.
1125 (GEN_LIS): New macro.
1126 (GEN_ORI): New macro.
1127 (GEN_ORIS): New macro.
1128 (GEN_LWZ): New macro.
1129 (GEN_STW): New macro.
1130 (GEN_STWU): New macro.
1131 (gen_xfx_form): New function.
1132 (GEN_MFSPR): New macro.
1133 (GEN_MTSPR): New macro.
1134 (GEN_MFCR): New macro.
1135 (GEN_MTCR): New macro.
1136 (GEN_SYNC): New macro.
1137 (GEN_LWSYNC): New macro.
1138 (gen_x_form): New function.
1139 (GEN_OR): New macro.
1140 (GEN_MR): New macro.
1141 (GEN_LWARX): New macro.
1142 (GEN_STWCX): New macro.
1143 (GEN_CMPW): New macro.
1144 (gen_md_form): New function.
1145 (GEN_RLDICL): New macro.
1146 (GEN_RLDICR): New macro.
1147 (gen_i_form): New function.
1148 (GEN_B): New macro.
1149 (GEN_BL): New macro.
1150 (gen_b_form): New function.
1151 (GEN_BNE): New macro.
1152 (GEN_LOAD): New macro.
1153 (GEN_STORE): New macro.
1154 (gen_limm): New function.
1155 (gen_atomic_xchg): New function.
1156 (gen_call): New function.
1157 (ppc_relocate_instruction): New function.
1158 (ppc_install_fast_tracepoint_jump_pad): New function.
1159 (ppc_get_min_fast_tracepoint_insn_len): New function.
1160 (ppc_get_ipa_tdesc_idx): New function.
1161 (the_low_target): Wire in the new functions.
1162 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1163 tdescs.
1164 * linux-ppc-tdesc.h: New file.
1165
1166 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1167
1168 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1169 (alloc_jump_pad_buffer): New function.
1170 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1171 (alloc_jump_pad_buffer): New function.
1172 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1173 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1174 (alloc_jump_pad_buffer): New function.
1175 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1176 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1177 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1178 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1179
1180 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1181
1182 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1183 * linux-amd64-ipa.c: Likewise.
1184 * linux-i386-ipa.c: Likewise.
1185 * linux-s390-ipa.c: Likewise.
1186 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1187 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1188 set_trace_state_variable_value_ptr.
1189 (struct ipa_sym_addresses): Likewise.
1190 (symbol_list): Likewise.
1191 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1192 accessing gdb_collect directly.
1193 (gdb_collect_ptr_type): New typedef.
1194 (get_raw_reg_ptr_type): New typedef.
1195 (get_trace_state_variable_value_ptr_type): New typedef.
1196 (set_trace_state_variable_value_ptr_type): New typedef.
1197 (gdb_collect_ptr): New global.
1198 (get_raw_reg_ptr): New global.
1199 (get_trace_state_variable_value_ptr): New global.
1200 (set_trace_state_variable_value_ptr): New global.
1201 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1202 accessing get_raw_reg directly.
1203 (get_get_tsv_func_addr): Likewise for
1204 get_trace_state_variable_value_ptr.
1205 (get_set_tsv_func_addr): Likewise for
1206 set_trace_state_variable_value_ptr.
1207 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1208
1209 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1212
1213 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1214
1215 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1216 packets.
1217 (relocate_instruction): Remove own_buf.
1218 * server.c (own_buf): Make global.
1219 (handle_v_requests): Make global.
1220 * server.h (own_buf): New declaration.
1221 (handle_v_requests): New prototype.
1222
1223 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1224
1225 PR 18377
1226 * linux-s390-low.c (add_insns): New function.
1227 (s390_emit_prologue): New function.
1228 (s390_emit_epilogue): New function.
1229 (s390_emit_add): New function.
1230 (s390_emit_sub): New function.
1231 (s390_emit_mul): New function.
1232 (s390_emit_lsh): New function.
1233 (s390_emit_rsh_signed): New function.
1234 (s390_emit_rsh_unsigned): New function.
1235 (s390_emit_ext): New function.
1236 (s390_emit_log_not): New function.
1237 (s390_emit_bit_and): New function.
1238 (s390_emit_bit_or): New function.
1239 (s390_emit_bit_xor): New function.
1240 (s390_emit_bit_not): New function.
1241 (s390_emit_equal): New function.
1242 (s390_emit_less_signed): New function.
1243 (s390_emit_less_unsigned): New function.
1244 (s390_emit_ref): New function.
1245 (s390_emit_if_goto): New function.
1246 (s390_emit_goto): New function.
1247 (s390_write_goto_address): New function.
1248 (s390_emit_litpool): New function.
1249 (s390_emit_const): New function.
1250 (s390_emit_call): New function.
1251 (s390_emit_reg): New function.
1252 (s390_emit_pop): New function.
1253 (s390_emit_stack_flush): New function.
1254 (s390_emit_zero_ext): New function.
1255 (s390_emit_swap): New function.
1256 (s390_emit_stack_adjust): New function.
1257 (s390_emit_set_r2): New function.
1258 (s390_emit_int_call_1): New function.
1259 (s390_emit_void_call_2): New function.
1260 (s390_emit_eq_goto): New function.
1261 (s390_emit_ne_goto): New function.
1262 (s390_emit_lt_goto): New function.
1263 (s390_emit_le_goto): New function.
1264 (s390_emit_gt_goto): New function.
1265 (s390_emit_ge_goto): New function.
1266 (s390x_emit_prologue): New function.
1267 (s390x_emit_epilogue): New function.
1268 (s390x_emit_add): New function.
1269 (s390x_emit_sub): New function.
1270 (s390x_emit_mul): New function.
1271 (s390x_emit_lsh): New function.
1272 (s390x_emit_rsh_signed): New function.
1273 (s390x_emit_rsh_unsigned): New function.
1274 (s390x_emit_ext): New function.
1275 (s390x_emit_log_not): New function.
1276 (s390x_emit_bit_and): New function.
1277 (s390x_emit_bit_or): New function.
1278 (s390x_emit_bit_xor): New function.
1279 (s390x_emit_bit_not): New function.
1280 (s390x_emit_equal): New function.
1281 (s390x_emit_less_signed): New function.
1282 (s390x_emit_less_unsigned): New function.
1283 (s390x_emit_ref): New function.
1284 (s390x_emit_if_goto): New function.
1285 (s390x_emit_const): New function.
1286 (s390x_emit_call): New function.
1287 (s390x_emit_reg): New function.
1288 (s390x_emit_pop): New function.
1289 (s390x_emit_stack_flush): New function.
1290 (s390x_emit_zero_ext): New function.
1291 (s390x_emit_swap): New function.
1292 (s390x_emit_stack_adjust): New function.
1293 (s390x_emit_int_call_1): New function.
1294 (s390x_emit_void_call_2): New function.
1295 (s390x_emit_eq_goto): New function.
1296 (s390x_emit_ne_goto): New function.
1297 (s390x_emit_lt_goto): New function.
1298 (s390x_emit_le_goto): New function.
1299 (s390x_emit_gt_goto): New function.
1300 (s390x_emit_ge_goto): New function.
1301 (s390_emit_ops): New function.
1302 (struct linux_target_ops): Fill in emit_ops hook.
1303
1304 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1305
1306 PR 18377
1307 * Makefile.in: Add s390 IPA files.
1308 * configure.srv: Build IPA for s390.
1309 * linux-s390-ipa.c: New file.
1310 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1311 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1312 (tdesc_s390_linux32): Likewise.
1313 (init_registers_s390_linux32v1): Likewise.
1314 (tdesc_s390_linux32v1): Likewise.
1315 (init_registers_s390_linux32v2): Likewise.
1316 (tdesc_s390_linux32v2): Likewise.
1317 (init_registers_s390_linux64): Likewise.
1318 (tdesc_s390_linux64): Likewise.
1319 (init_registers_s390_linux64v1): Likewise.
1320 (tdesc_s390_linux64v1): Likewise.
1321 (init_registers_s390_linux64v2): Likewise.
1322 (tdesc_s390_linux64v2): Likewise.
1323 (init_registers_s390_te_linux64): Likewise.
1324 (tdesc_s390_te_linux64): Likewise.
1325 (init_registers_s390_vx_linux64): Likewise.
1326 (tdesc_s390_vx_linux64): Likewise.
1327 (init_registers_s390_tevx_linux64): Likewise.
1328 (tdesc_s390_tevx_linux64): Likewise.
1329 (init_registers_s390x_linux64): Likewise.
1330 (tdesc_s390x_linux64): Likewise.
1331 (init_registers_s390x_linux64v1): Likewise.
1332 (tdesc_s390x_linux64v1): Likewise.
1333 (init_registers_s390x_linux64v2): Likewise.
1334 (tdesc_s390x_linux64v2): Likewise.
1335 (init_registers_s390x_te_linux64): Likewise.
1336 (tdesc_s390x_te_linux64): Likewise.
1337 (init_registers_s390x_vx_linux64): Likewise.
1338 (tdesc_s390x_vx_linux64): Likewise.
1339 (init_registers_s390x_tevx_linux64): Likewise.
1340 (tdesc_s390x_tevx_linux64): Likewise.
1341 (have_hwcap_s390_vx): New static variable.
1342 (s390_arch_setup): Fill have_hwcap_s390_vx.
1343 (s390_get_thread_area): New function.
1344 (s390_ft_entry_gpr_esa): New const.
1345 (s390_ft_entry_gpr_zarch): New const.
1346 (s390_ft_entry_misc): New const.
1347 (s390_ft_entry_fr): New const.
1348 (s390_ft_entry_vr): New const.
1349 (s390_ft_main_31): New const.
1350 (s390_ft_main_64): New const.
1351 (s390_ft_exit_fr): New const.
1352 (s390_ft_exit_vr): New const.
1353 (s390_ft_exit_misc): New const.
1354 (s390_ft_exit_gpr_esa): New const.
1355 (s390_ft_exit_gpr_zarch): New const.
1356 (append_insns): New function.
1357 (s390_relocate_instruction): New function.
1358 (s390_install_fast_tracepoint_jump_pad): New function.
1359 (s390_get_min_fast_tracepoint_insn_len): New function.
1360 (s390_get_ipa_tdesc_idx): New function.
1361 (struct linux_target_ops): Wire in the above functions.
1362 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1363 * linux-s390-tdesc.h: New file.
1364
1365 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1366
1367 * linux-s390-low.c (s390_supports_tracepoints): New function.
1368 (struct linux_target_ops): Fill supports_tracepoints hook.
1369
1370 2016-03-18 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-low.c (lwp_signal_can_be_delivered): New function.
1373 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1374
1375 2016-03-18 Yao Qi <yao.qi@linaro.org>
1376
1377 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1378 0 if signal is enqueued. Remove 'signal' from one debugging
1379 message. Move one debugging message to some lines below.
1380 Remove code setting 'signal' to 0.
1381
1382 2016-03-18 Yao Qi <yao.qi@linaro.org>
1383
1384 * linux-low.c (linux_low_filter_event): Remove redundant
1385 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1386
1387 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1388
1389 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1390 (struct linux_target_ops): Wire in the above.
1391
1392 2016-03-03 Yao Qi <yao.qi@linaro.org>
1393
1394 * linux-low.c: Update comments to start_step_over.
1395
1396 2016-03-03 Yao Qi <yao.qi@linaro.org>
1397
1398 PR server/19736
1399 * linux-low.c (handle_extended_wait): Set child suspended
1400 if event_lwp->bp_reinsert isn't zero.
1401
1402 2016-03-02 Yao Qi <yao.qi@linaro.org>
1403
1404 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1405 enqueue_pending_signal.
1406
1407 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1408
1409 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1410 is actually loaded.
1411
1412 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1413
1414 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1415 (s390_regmap_3264) [!__s390x__]: New global.
1416 (s390_collect_ptrace_register): Skip map entries containing -1.
1417 (s390_supply_ptrace_register): Ditto.
1418 (s390_fill_gprs_high): New function.
1419 (s390_store_gprs_high): New function.
1420 (s390_regsets): Add NT_S390_HIGH_GPRS.
1421 (s390_get_hwcap): Enable on 31-bit.
1422 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1423 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1424 Detect NT_S390_HIGH_GPRS.
1425 (s390_usrregs_info_3264): Enable on 31-bit.
1426 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1427 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1428
1429 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1430
1431 PR gdb/13808
1432 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1433 * configure.srv: Ditto.
1434 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1435 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1436 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1437 (init_registers_amd64_linux): Remove prototype.
1438 (tdesc_amd64_linux): Remove declaration.
1439 (get_ipa_tdesc): New function.
1440 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1441 initialize remaining tdescs.
1442 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1443 (init_registers_i386_linux): Remove prototype.
1444 (tdesc_i386_linux): Remove declaration.
1445 (get_ipa_tdesc): New function.
1446 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1447 initialize remaining tdescs.
1448 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1449 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1450 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1451 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1452 (x86_get_ipa_tdesc_idx): New function.
1453 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1454 * linux-x86-tdesc.h: New file.
1455 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1456 (target_get_ipa_tdesc_idx): New macro.
1457 * tracepoint.c (ipa_tdesc_idx): New macro.
1458 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1459 (symbol_list): Add ipa_tdesc_idx.
1460 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1461 (ipa_tdesc): Remove.
1462 (ipa_tdesc_idx): New variable.
1463 (get_context_regcache): Use get_ipa_tdesc.
1464 (gdb_collect): Ditto.
1465 (gdb_probe): Ditto.
1466 * tracepoint.h (get_ipa_tdesc): New prototype.
1467 (ipa_tdesc): Remove.
1468
1469 2016-02-24 Pedro Alves <palves@redhat.com>
1470
1471 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1472 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1473 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1474 Factor out common code between the USE_SIGTRAP_SIGINFO and
1475 !USE_SIGTRAP_SIGINFO blocks.
1476 (linux_low_filter_event): Call save_stop_reason instead of
1477 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1478 Update comments.
1479 (linux_wait_1): Update comments.
1480
1481 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1482
1483 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1484 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1485 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1486 ppc_insert_point, ppc_remove_point.
1487
1488 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1489
1490 * linux-s390-low.c (s390_supports_z_point_type): New function.
1491 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1492
1493 2016-02-16 Yao Qi <yao.qi@linaro.org>
1494
1495 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1496 PC. Get pc from regcache_read_pc.
1497
1498 2016-02-12 Yao Qi <yao.qi@linaro.org>
1499
1500 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1501 or linux_get_pc_32bit.
1502 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1503
1504 2016-02-12 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1507 arm_linux_get_next_pcs_fixup.
1508
1509 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1510
1511 * tracepoint.c (x_tracepoint_action_download): Change
1512 write_inferior_data_ptr to write_inferior_data_pointer.
1513 (cmd_qtstart): Likewise.
1514 (write_inferior_data_ptr): Remove.
1515 (download_agent_expr): Change write_inferior_data_ptr to
1516 write_inferior_data_pointer.
1517 (download_tracepoint_1): Likewise.
1518 (download_tracepoint): Likewise.
1519 (download_trace_state_variables): Likewise.
1520
1521 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1522 Marcin Kościelnicki <koriakin@0x04.net>
1523
1524 * tracepoint.c (struct tracepoint_action_ops): Remove.
1525 (struct tracepoint_action): Remove ops.
1526 (m_tracepoint_action_download, r_tracepoint_action_download)
1527 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1528 size and offset accordingly.
1529 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1530 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1531 (tracepoint_action_send, tracepoint_action_download): New functions.
1532 Helpers for trace action handlers.
1533 (add_tracepoint_action): Remove setup actions ops.
1534 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1535
1536 2016-02-10 Yao Qi <yao.qi@linaro.org>
1537
1538 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1539
1540 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1541
1542 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1543 to AC_OUTPUT.
1544 * configure: Regenerate.
1545
1546 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1547
1548 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1549 void * to gdb_byte *.
1550 * linux-low.c (siginfo_fixup): Likewise.
1551 (linux_xfer_siginfo): Likewise.
1552 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1553 Likewise.
1554 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1555
1556 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1557
1558 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1559 to srv_tgtobj.
1560 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1561 to srv_tgtobj.
1562 * linux-x86-low.c [__x86_64__]: Include
1563 "nat/amd64-linux-siginfo.h".
1564 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1565 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1566 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1567 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1568 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1569 (cpt_si_fd, si_timerid, si_overrun): Move from
1570 nat/amd64-linux-siginfo.c.
1571 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1572
1573 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1574
1575 * server.c (skip_to_semicolon): Remove.
1576 (process_point_options): Use strchrnul instead of
1577 skip_to_semicolon.
1578
1579 2016-01-26 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1582 * linux-low.c (install_software_single_step_breakpoints): Don't
1583 call regcache_read_pc.
1584 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1585 argument pc.
1586
1587 2016-01-26 Yao Qi <yao.qi@linaro.org>
1588
1589 * linux-low.c (install_software_single_step_breakpoints): Call
1590 regcache_read_pc instead of get_pc.
1591
1592 2016-01-26 Yao Qi <yao.qi@linaro.org>
1593
1594 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1595 (unblock_async_io): Rename to ...
1596 (block_unblock_async_io): ... it. New function.
1597 (enable_async_io): Don't install SIGIO handler. Unblock it
1598 instead.
1599 (disable_async_io): Don't ignore SIGIO. Block it instead.
1600 (initialize_async_io): Install SIGIO handler. Don't call
1601 unblock_async_io.
1602
1603 2016-01-26 Yao Qi <yao.qi@linaro.org>
1604
1605 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1606 first character is '\003', call *the_target->request_interrupt.
1607
1608 2016-01-25 Yao Qi <yao.qi@linaro.org>
1609
1610 * remote-utils.c (new_thread_notify): Remove.
1611 (dead_thread_notify): Likewise.
1612 * remote-utils.h (new_thread_notify): Remove declaration.
1613 (dead_thread_notify): Likewise.
1614
1615 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1616
1617 * gdb.trace/pending.exp: Fix expected message on continue.
1618
1619 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1620
1621 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1622 it works properly on big-endian machines where sizeof (CORE_ADDR)
1623 != sizeof (void *).
1624
1625 2016-01-21 Pedro Alves <palves@redhat.com>
1626
1627 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1628 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1629 * configure: Regenerate.
1630
1631 2016-01-21 Yao Qi <yao.qi@linaro.org>
1632
1633 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1634 is_thumb and set it according to CPSR saved on the stack.
1635 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1636 arm_sigreturn_next_pc.
1637
1638 2016-01-18 Yao Qi <yao.qi@linaro.org>
1639
1640 * linux-low.c (linux_set_pc_64bit): New function.
1641 (linux_get_pc_64bit): New function.
1642 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1643 Declare.
1644 * linux-sparc-low.c (debug_threads): Remove declaration.
1645 (sparc_get_pc): Remove.
1646 (the_low_target): Use linux_get_pc_64bit instead of
1647 sparc_get_pc.
1648 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1649 (the_low_target): Use linux_get_pc_64bit and
1650 linux_set_pc_64bit.
1651
1652 2016-01-18 Yao Qi <yao.qi@linaro.org>
1653
1654 * linux-arm-low.c (debug_threads): Remove declaration.
1655 (arm_get_pc, arm_set_pc): Remove.
1656 (the_low_target): Use linux_get_pc_32bit and
1657 linux_set_pc_32bit.
1658 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1659 (the_low_target): Use linux_get_pc_32bit and
1660 linux_set_pc_32bit.
1661 * linux-cris-low.c (debug_threads): Remove declaration.
1662 (cris_get_pc, cris_set_pc,): Remove.
1663 (the_low_target): Use linux_get_pc_32bit and
1664 linux_set_pc_32bit.
1665 * linux-crisv32-low.c (debug_threads): Remove declaration.
1666 (cris_get_pc, cris_set_pc): Remove.
1667 (the_low_target): Use linux_get_pc_32bit and
1668 linux_set_pc_32bit.
1669 * linux-low.c: Include inttypes.h.
1670 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1671 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1672 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1673 (the_low_target): Use linux_get_pc_32bit and
1674 linux_set_pc_32bit.
1675 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1676 (the_low_target): Use linux_get_pc_32bit and
1677 linux_set_pc_32bit.
1678 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1679 (the_low_target): Use linux_get_pc_32bit and
1680 linux_set_pc_32bit.
1681 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1682 (the_low_target): Use linux_get_pc_32bit and
1683 linux_set_pc_32bit.
1684 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1685 (the_low_target): Use linux_get_pc_32bit and
1686 linux_set_pc_32bit.
1687
1688 2016-01-18 Gary Benson <gbenson@redhat.com>
1689
1690 * configure.ac (AC_FUNC_FORK): New check.
1691 * config.in: Regenerate.
1692 * configure: Likewise.
1693
1694 2016-01-14 Yao Qi <yao.qi@linaro.org>
1695
1696 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1697 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1698 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1699 arm_get_next_pcs_ctor.
1700
1701 2016-01-12 Josh Stone <jistone@redhat.com>
1702 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1703
1704 * inferiors.h: Include "gdb_vecs.h".
1705 (struct process_info): Add syscalls_to_catch.
1706 * inferiors.c (remove_process): Free syscalls_to_catch.
1707 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1708 syscall_return stops.
1709 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1710 * server.c (handle_general_set): Handle QCatchSyscalls.
1711 (handle_query): Report support for QCatchSyscalls.
1712 * target.h (struct target_ops): Add supports_catch_syscall.
1713 (target_supports_catch_syscall): New macro.
1714 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1715 (struct lwp_info): Add syscall_state.
1716 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1717 Maintain syscall_state and syscalls_to_catch across exec.
1718 (get_syscall_trapinfo): New function, proxy to the_low_target.
1719 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1720 (linux_low_filter_event): Toggle syscall_state entry/return for
1721 syscall traps, and set it ignored for all others.
1722 (gdb_catching_syscalls_p): New function.
1723 (gdb_catch_this_syscall_p): New function.
1724 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1725 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1726 (linux_supports_catch_syscall): New function.
1727 (linux_target_ops): Install it.
1728 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1729 (the_low_target): Install it.
1730
1731 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1732
1733 * acinclude.m4: Include new ../warning.m4 file.
1734 * configure: Regenerated.
1735 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1736
1737 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1738
1739 * ax.c (is_goto_target): Mark static.
1740 * linux-low.c (register_addr): Likewise.
1741 (linux_fetch_registers, linux_store_registers): Likewise.
1742 * mem-break.c (any_persistent_commands): Fix old prototype.
1743 (add_commands_to_breakpoint): Mark static.
1744 * regcache.c (find_register_by_name): Delete unused func.
1745 * remote-utils.c (hex_or_minus_one): Mark static.
1746 * server.c (monitor_show_help): Mark static.
1747 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1748 handle_v_requests): Likewise.
1749
1750 2016-01-12 Pedro Alves <palves@redhat.com>
1751
1752 Remove use of the registered trademark symbol throughout.
1753
1754 2016-01-08 Yao Qi <yao.qi@linaro.org>
1755
1756 * remote-utils.c (getpkt): If c is '\003', call target hook
1757 request_interrupt.
1758
1759 2016-01-06 Yao Qi <yao.qi@linaro.org>
1760
1761 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1762 linux-aarch32-low.c.
1763 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1764 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1765 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1766 (thumb2_breakpoint): Declare.
1767 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1768 linux-aarch32-low.h.
1769 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1770 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1771 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1772
1773 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1774
1775 * gdbreplay.c (gdbreplay_version): Change copyright year in
1776 version message.
1777 * server.c (gdbserver_version): Likewise.
1778
1779 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1780
1781 * server.c (crc32_table): Delete.
1782 (crc32): Use libiberty's xcrc32 function.
1783
1784 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1785
1786 * lynx-low.c (lynx_delete_thread_callback): New function.
1787 (lynx_mourn): Properly delete our process and all of its
1788 threads. Remove call to clear_inferiors.
1789
1790 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1791
1792 * target.c (thread_search_callback): Add check that
1793 the thread_stopped target callback is not NULL before
1794 calling it.
1795
1796 2015-12-21 Yao Qi <yao.qi@linaro.org>
1797
1798 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1799 arm breakpoint.
1800
1801 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1802
1803 * server.c (handle_query): Call target_supports_software_single_step.
1804
1805 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1806
1807 * linux-low.c (single_step): New function.
1808 (linux_resume_one_lwp_throw): Call single_step.
1809 (start_step_over): Likewise.
1810
1811 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1812
1813 * Makefile.in (SFILES): Append arch/arm-linux.c,
1814 arch/arm-get-next-pcs.c.
1815 (arm-linux.o): New rule.
1816 (arm-get-next-pcs.o): New rule.
1817 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1818 arm-linux.o.
1819 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1820 to linux-aarch32-low.c.
1821 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1822 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1823 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1824 (thumb2_breakpoint_len): Likewise.
1825 (arm_is_thumb_mode): Make non-static.
1826 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1827 from linux-aarch32-low.c.
1828 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1829 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1830 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1831 (thumb2_breakpoint_len): Likewise.
1832 (arm_is_thumb_mode): New declaration.
1833 * linux-arm-low.c: Include arch/arm-linux.h
1834 aarch/arm-get-next-pcs.h, sys/syscall.h.
1835 (get_next_pcs_ops): New struct.
1836 (get_next_pcs_addr_bits_remove): New function.
1837 (get_next_pcs_is_thumb): New function.
1838 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1839 (arm_sigreturn_next_pc): Likewise.
1840 (get_next_pcs_syscall_next_pc): Likewise.
1841 (arm_gdbserver_get_next_pcs): Likewise.
1842 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1843 Initialize.
1844 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1845 * server.h: Include gdb_vecs.h.
1846
1847 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1848
1849 * Makefile.in (SFILES): Append common/common-regcache.c.
1850 (OBS): Append common-regcache.o.
1851 (common-regcache.o): New rule.
1852 * regcache.c (init_register_cache): Initialize cache to
1853 REG_UNAVAILABLE.
1854 (regcache_raw_read_unsigned): New function.
1855 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1856 register_status enum.
1857
1858 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1859
1860 * linux-aarch64-low.c (the_low_targets): Rename
1861 breakpoint_reinsert_addr to get_next_pcs.
1862 * linux-arm-low.c (the_low_targets): Likewise.
1863 * linux-bfin-low.c (the_low_targets): Likewise.
1864 * linux-cris-low.c (the_low_targets): Likewise.
1865 * linux-crisv32-low.c (the_low_targets): Likewise.
1866 * linux-low.c (can_software_single_step): Likewise.
1867 (install_software_single_step_breakpoints): New function.
1868 (start_step_over): Use install_software_single_step_breakpoints.
1869 * linux-low.h: New CORE_ADDR vector.
1870 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1871 get_next_pcs.
1872 * linux-mips-low.c (the_low_targets): Likewise.
1873 * linux-nios2-low.c (the_low_targets): Likewise.
1874 * linux-sparc-low.c (the_low_targets): Likewise.
1875
1876 2015-12-17 Pedro Alves <palves@redhat.com>
1877
1878 * linux-low.c (linux_kill_one_lwp): Remove references to
1879 LinuxThreads.
1880 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1881 to 'kill'.
1882 (linux_init_signals): Delete.
1883 (initialize_low): Adjust.
1884 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1885
1886 2015-12-16 Pedro Alves <palves@redhat.com>
1887
1888 * configure.ac (compiler warning flags): When testing a
1889 -Wno-foo option, check whether -Wfoo works instead.
1890 * configure: Regenerate.
1891
1892 2015-12-11 Don Breazeal <donb@codesourcery.com>
1893
1894 * server.c (process_serial_event): Don't exit from gdbserver
1895 in remote mode if there are still active inferiors.
1896
1897 2015-12-11 Yao Qi <yao.qi@linaro.org>
1898
1899 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1900 arm_breakpoint_at if the process is 32-bit.
1901
1902 2015-12-11 Yao Qi <yao.qi@linaro.org>
1903
1904 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1905 arm breakpoint.
1906
1907 2015-12-07 Yao Qi <yao.qi@linaro.org>
1908
1909 * configure.srv: Append arm.o to srv_tgtobj for
1910 aarch64*-*-linux* target.
1911 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1912 from linux-arm-low.c.
1913 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1914 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1915 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1916 (thumb2_breakpoint_len): Likewise.
1917 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1918 (arm_breakpoint_kinds): Likewise.
1919 (arm_breakpoint_kind_from_pc): Likewise.
1920 (arm_sw_breakpoint_from_kind): Likewise.
1921 (arm_breakpoint_kind_from_current_state): Likewise.
1922 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1923 (arm_sw_breakpoint_from_kind): Declare.
1924 (arm_breakpoint_kind_from_current_state): Declare.
1925 (arm_breakpoint_at): Declare.
1926 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1927 arm_sw_breakpoint_from_kind if process is 32-bit.
1928 (aarch64_breakpoint_kind_from_pc): New function.
1929 (aarch64_breakpoint_kind_from_current_state): New function.
1930 (the_low_target): Initialize fields breakpoint_kind_from_pc
1931 and breakpoint_kind_from_current_state.
1932 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1933 linux-aarch32-low.c.
1934 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1935 (arm_breakpoint, arm_breakpoint_len): Likewise.
1936 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1937 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1938 (arm_is_thumb_mode): Likewise.
1939 (arm_breakpoint_at): Likewise.
1940 (arm_breakpoint_kind_from_pc): Likewise.
1941 (arm_sw_breakpoint_from_kind): Likewise.
1942 (arm_breakpoint_kind_from_current_state): Likewise.
1943
1944 Revert:
1945 2015-08-04 Yao Qi <yao.qi@linaro.org>
1946
1947 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1948 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1949 * server.c (extended_protocol): Remove "static".
1950 * server.h (extended_protocol): Declare it.
1951
1952 2015-12-04 Josh Stone <jistone@redhat.com>
1953
1954 * target.h (struct target_ops) <arch_setup>: Rename to ...
1955 (struct target_ops) <post_create_inferior>: ... this.
1956 (target_arch_setup): Rename to ...
1957 (target_post_create_inferior): ... this, calling post_create_inferior.
1958 * server.c (start_inferior): Update target_arch_setup calls to
1959 target_post_create_inferior.
1960 * linux-low.c (linux_low_ptrace_options): Forward declare.
1961 (linux_arch_setup): Update its comment for general use.
1962 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1963 (struct linux_target_ops): Use linux_post_create_inferior.
1964 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1965 to post_create_inferior.
1966 * nto-low.c (struct nto_target_ops): Likewise.
1967 * spu-low.c (struct spu_target_ops): Likewise.
1968 * win32-low.c (struct win32_target_ops): Likewise.
1969
1970 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1971
1972 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1973
1974 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1975
1976 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1977 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1978 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1979 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1980 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1981 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1982 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1983 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1984 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1985 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1986 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1987 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1988
1989 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1990
1991 * linux-low.c (linux_look_up_symbols): Don't call
1992 linux_supports_traceclone.
1993 * linux-low.h (thread_db_init): Remove use_events argument.
1994 * thread-db.c (thread_db_use_event): Remove global variable.
1995 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1996 (struct thread_db) <td_create_bp>: Remove field.
1997 (thread_db_create_event): Remove function.
1998 (thread_db_enable_reporting): Likewise.
1999 (find_one_thread): Don't check for thread_db_use_events.
2000 (attach_thread): Likewise.
2001 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2002 (try_thread_db_load_1): Don't check for thread_db_use_events.
2003 (thread_db_init): Remove use_events argument and thread events
2004 handling.
2005 (remove_thread_event_breakpoints): Remove function.
2006 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2007
2008 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2009
2010 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2011 New function.
2012 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2013 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2014 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2015 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2016 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2017 Initialize.
2018 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2019 New function.
2020 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2021 * linux-low.c (can_hardware_single_step): Use
2022 supports_hardware_single_step.
2023 (can_software_single_step): New function.
2024 (start_step_over): Call can_software_single_step.
2025 (linux_supports_hardware_single_step): New function.
2026 (struct target_ops) <supports_software_single_step>: Initialize.
2027 * linux-low.h (struct linux_target_ops)
2028 <supports_hardware_single_step>: Initialize.
2029 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2030 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2031 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2032 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2033 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2035 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2036 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2037 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2038 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2039 Initialize.
2040 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2041 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2042 Initialize.
2043 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2044 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2045 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2046 New function.
2047 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2048 * target.h (struct target_ops): <supports_software_single_step>:
2049 New field.
2050 (target_supports_software_single_step): New macro.
2051
2052 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2053
2054 * linux-low.c (linux_wait_1): Fix pc advance condition.
2055 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2056 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2057
2058 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2059
2060 * linux-arm-low.c (arm_is_thumb_mode): New function.
2061 (arm_breakpoint_at): Use arm_is_thumb_mode.
2062 (arm_breakpoint_kind_from_current_state): New function.
2063 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2064 Initialize.
2065 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2066 (linux_breakpoint_kind_from_current_state): New function.
2067 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2068 * linux-low.h (struct linux_target_ops)
2069 <breakpoint_kind_from_current_state>: New field.
2070 * target.h (struct target_ops): Likewise.
2071 (target_breakpoint_kind_from_current_state): New macro.
2072
2073 2015-11-30 Pedro Alves <palves@redhat.com>
2074
2075 * linux-low.c (linux_resume): Wake up the event loop before
2076 returning.
2077
2078 2015-11-30 Pedro Alves <palves@redhat.com>
2079
2080 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2081 check.
2082 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2083 to -1.
2084 * target.c (struct thread_search): New structure.
2085 (thread_search_callback): New function.
2086 (prev_general_thread): New global.
2087 (prepare_to_access_memory, done_accessing_memory): New functions.
2088 * target.h (prepare_to_access_memory, done_accessing_memory):
2089 Replace macros with function declarations.
2090
2091 2015-11-30 Pedro Alves <palves@redhat.com>
2092
2093 PR 14618
2094 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2095 report TARGET_WAITKIND_NO_RESUMED.
2096 * remote-utils.c (prepare_resume_reply): Handle
2097 TARGET_WAITKIND_NO_RESUMED.
2098 * server.c (report_no_resumed): New global.
2099 (handle_query) <qSupported>: Handle "no-resumed+". Report
2100 "no-resumed+" support.
2101 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2102 return error if the client doesn't support no-resumed events.
2103 (push_stop_notification): New function.
2104 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2105 events if the client supports them.
2106
2107 2015-11-30 Pedro Alves <palves@redhat.com>
2108
2109 * linux-low.c (thread_still_has_status_pending_p): Don't check
2110 vCont;t here.
2111 (lwp_resumed): New function.
2112 (status_pending_p_callback): Return early if the LWP is not
2113 supposed to be resumed.
2114
2115 2015-11-30 Pedro Alves <palves@redhat.com>
2116
2117 * linux-low.c (handle_extended_wait): Assert that the LWP's
2118 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2119 thread create events, leave the new child's status pending.
2120 (linux_low_filter_event): If GDB wants to hear about thread exit
2121 events, leave the LWP marked dead and don't delete it.
2122 (linux_wait_for_event_filtered): Don't check for thread exit.
2123 (filter_exit_event): New function.
2124 (linux_wait_1): Use it, when returning an exit event.
2125 (linux_resume_one_lwp_throw): Assert that the LWP's
2126 waitstatus is TARGET_WAITKIND_IGNORE.
2127 * remote-utils.c (prepare_resume_reply): Handle
2128 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2129 * server.c (report_thread_events): New global.
2130 (handle_general_set): Handle QThreadEvents.
2131 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2132 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2133 TARGET_WAITKIND_THREAD_EXITED.
2134 * server.h (report_thread_events): Declare.
2135
2136 2015-11-30 Pedro Alves <palves@redhat.com>
2137
2138 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2139 the thread's last_resume_kind was resume_stop.
2140
2141 2015-11-30 Pedro Alves <palves@redhat.com>
2142
2143 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2144 before returning.
2145
2146 2015-11-30 Pedro Alves <palves@redhat.com>
2147
2148 * server.c (handle_v_requests): Handle vCtrlC.
2149
2150 2015-11-30 Pedro Alves <palves@redhat.com>
2151
2152 * gdbthread.h (find_any_thread_of_pid): Declare.
2153 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2154 functions.
2155 * server.c (handle_query): If current_thread is NULL, look for
2156 another thread of the selected process.
2157
2158 2015-11-26 Daniel Colascione <dancol@dancol.org>
2159 Simon Marchi <simon.marchi@ericsson.com>
2160
2161 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2162 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2163 name in reply.
2164 * target.h (struct target_ops) <thread_name>: New field.
2165 (target_thread_name): New macro.
2166
2167 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2168
2169 * regcache.h (regcache_invalidate_pid): Add declaration.
2170 * regcache.c (regcache_invalidate_pid): New function, extracted
2171 from regcache_invalidate.
2172 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2173 Add trivial documentation comment.
2174 * lynx-low.c: Use regcache_invalidate_pid instead of
2175 regcache_invalidate.
2176
2177 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2178
2179 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2180 and Elf64_auxv_t if the target is Android.
2181
2182 2015-11-22 Doug Evans <xdje42@gmail.com>
2183
2184 * target.h: #include <sys/types.h>.
2185
2186 2015-11-19 Pedro Alves <palves@redhat.com>
2187
2188 * linux-low.c (linux_process_qsupported): Change prototype.
2189 Adjust.
2190 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2191 Change prototype.
2192 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2193 and adjust to loop over all features.
2194 * server.c (handle_query) <qSupported>: Adjust to call
2195 target_process_qsupported once, passing it a vector of unprocessed
2196 features.
2197 * target.h (struct target_ops) <process_qsupported>: Change
2198 prototype.
2199 (target_process_qsupported): Adjust.
2200
2201 2015-11-19 Pedro Alves <palves@redhat.com>
2202
2203 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2204 mode.
2205 * configure: Regenerate.
2206
2207 2015-11-19 Pedro Alves <palves@redhat.com>
2208
2209 * configure: Regenerate.
2210
2211 2015-11-19 Yao Qi <yao.qi@linaro.org>
2212
2213 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2214 type to uint32_t.
2215
2216 2015-11-19 Yao Qi <yao.qi@linaro.org>
2217
2218 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2219 (struct aarch64_operand): Move enum out.
2220
2221 2015-11-19 Yao Qi <yao.qi@linaro.org>
2222
2223 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2224 struct user_fpsimd_state *.
2225 (aarch64_store_fpregset): Likewise.
2226
2227 2015-11-19 Yao Qi <yao.qi@linaro.org>
2228
2229 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2230 struct user_pt_regs *.
2231 (aarch64_store_gregset): Likewise.
2232
2233 2015-11-18 Pedro Alves <palves@redhat.com>
2234
2235 * Makefile.in (all_object_files): Add $IPA_OBJS.
2236
2237 2015-11-17 Pedro Alves <palves@redhat.com>
2238
2239 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2240 GDB_SIGNAL_0 and gdb_signal_to_string.
2241
2242 2015-11-17 Pedro Alves <palves@redhat.com>
2243
2244 * win32-low.c (handle_output_debug_string): Remove parameter.
2245 (win32_kill): Remove our_status local and adjust call to
2246 handle_output_debug_string.
2247 (get_child_debug_event): Adjust call to
2248 handle_output_debug_string.
2249
2250 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2251
2252 * linux-mips-low.c (mips_fill_gregset): Add cast.
2253 (mips_store_gregset): Likewise.
2254 (mips_fill_fpregset): Likewise.
2255 (mips_store_fpregset): Likewise.
2256
2257 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2258
2259 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2260 priv.
2261
2262 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2263
2264 * linux-mips-low.c (mips_linux_new_thread): Change type of
2265 watch_type to enum target_hw_bp_type.
2266
2267 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2268
2269 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2270 Change return type to arm_hwbp_type.
2271
2272 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2275 (arm_store_gregset): Likewise.
2276 * linux-arm-low.c (arm_get_hwcap): Likewise.
2277 (arm_read_description): Likewise.
2278
2279 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2280
2281 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2282
2283 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2284
2285 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2286 (ppc_fill_vsxregset): Likewise.
2287 (ppc_store_vsxregset): Likewise.
2288 (ppc_fill_vrregset): Likewise.
2289 (ppc_store_vrregset): Likewise.
2290 (ppc_fill_evrregset): Likewise.
2291 (ppc_store_evrregset): Likewise.
2292
2293 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2294
2295 * linux-ppc-low.c (ppc_usrregs_info): Remove
2296 forward-declaration.
2297 (ppc_arch_setup): Move lower in file.
2298
2299 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2300
2301 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2302 (ps_pdwrite): Likewise.
2303
2304 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2305
2306 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2307 to after assert checks.
2308
2309 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2310
2311 * proc-service.c (ps_pdread): Add/adjust casts.
2312 (ps_pdwrite): Add/adjust casts.
2313
2314 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2315
2316 * server.c (handle_search_memory_1): Cast return value of
2317 memmem.
2318
2319 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2320
2321 * server.c (write_qxfer_response): Change type of data to
2322 gdb_byte *.
2323
2324 2015-10-29 Pedro Alves <palves@redhat.com>
2325
2326 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2327
2328 2015-10-29 Pedro Alves <palves@redhat.com>
2329
2330 * tracepoint.c (clear_installed_tracepoints): Add casts.
2331
2332 2015-10-29 Pedro Alves <palves@redhat.com>
2333
2334 * server.c (handle_v_cont, process_serial_event): Add enum
2335 gdb_signal casts to signal parsing code.
2336
2337 2015-10-29 Pedro Alves <palves@redhat.com>
2338
2339 * linux-low.h (NULL_REGSET): Define.
2340 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2341 * linux-arm-low.c (arm_regsets): Likewise.
2342 * linux-crisv32-low.c (cris_regsets): Likewise.
2343 * linux-m68k-low.c (m68k_regsets): Likewise.
2344 * linux-mips-low.c (mips_regsets): Likewise.
2345 * linux-nios2-low.c (nios2_regsets): Likewise.
2346 * linux-ppc-low.c (ppc_regsets): Likewise.
2347 * linux-s390-low.c (s390_regsets): Likewise.
2348 * linux-sh-low.c (sh_regsets): Likewise.
2349 * linux-sparc-low.c (sparc_regsets): Likewise.
2350 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2351 * linux-tile-low.c (tile_regsets): Likewise.
2352 * linux-x86-low.c (x86_regsets): Likewise.
2353 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2354
2355 2015-10-29 Pedro Alves <palves@redhat.com>
2356
2357 * linux-low.h (NULL_REGSET): Define.
2358 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2359 * linux-arm-low.c (arm_regsets): Likewise.
2360 * linux-crisv32-low.c (cris_regsets): Likewise.
2361 * linux-m68k-low.c (m68k_regsets): Likewise.
2362 * linux-mips-low.c (mips_regsets): Likewise.
2363 * linux-nios2-low.c (nios2_regsets): Likewise.
2364 * linux-ppc-low.c (ppc_regsets): Likewise.
2365 * linux-s390-low.c (s390_regsets): Likewise.
2366 * linux-sh-low.c (sh_regsets): Likewise.
2367 * linux-sparc-low.c (sparc_regsets): Likewise.
2368 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2369 * linux-tile-low.c (tile_regsets): Likewise.
2370 * linux-x86-low.c (x86_regsets): Likewise.
2371 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2372
2373 2015-10-26 Doug Evans <dje@google.com>
2374
2375 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2376
2377 2015-10-26 Doug Evans <dje@google.com>
2378
2379 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2380
2381 2015-10-26 Doug Evans <dje@google.com>
2382
2383 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2384 for debug_printf.
2385 (attach_thread, find_new_threads_callback): Ditto.
2386
2387 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2388
2389 * mem-break.h (set_breakpoint_data): Remove.
2390
2391 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2392
2393 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2394 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2395 (initialize_low): Remove set_breakpoint_data call.
2396 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2397 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2398 (initialize_low): Remove set_breakpoint_data call.
2399 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2400 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2401 (initialize_low): Remove set_breakpoint_data call.
2402
2403 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2404
2405 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2406 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2407 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2408 * target.h (target_breakpoint_kind_from_pc): New macro.
2409
2410 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2411
2412 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2413 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2414 the default breakpoint kind.
2415
2416 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2417
2418 * linux-arm-low.c (arm_supports_z_point_type): Add software
2419 breakpoint support.
2420
2421 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2422
2423 * linux-arm-low.c: Refactor breakpoint definitions.
2424 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2425 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2426
2427 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2428
2429 * Makefile.in: Add arm.c/o.
2430 * configure.srv: Likewise.
2431 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2432 (arm_breakpoint_kind_from_pc): New function.
2433 (arm_sw_breakpoint_from_kind): Return proper kind.
2434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2435
2436 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2437
2438 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2439 removal.
2440 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2441 (struct raw_breakpoint) <size>: Remove.
2442 (struct raw_breakpoint) <kind>: Add.
2443 (bp_size): New function.
2444 (bp_opcode): Likewise.
2445 (find_raw_breakpoint_at): Adjust for kind.
2446 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2447 (remove_memory_breakpoint): Adjust for kind call bp_size.
2448 (set_raw_breakpoint_at): Adjust for kind.
2449 (set_breakpoint): Likewise.
2450 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2451 (delete_raw_breakpoint): Adjust for kind.
2452 (delete_breakpoint): Likewise.
2453 (find_gdb_breakpoint): Likewise.
2454 (set_gdb_breakpoint_1): Likewise.
2455 (set_gdb_breakpoint): Likewise.
2456 (delete_gdb_breakpoint_1): Likewise.
2457 (delete_gdb_breakpoint): Likewise.
2458 (uninsert_raw_breakpoint): Likewise.
2459 (reinsert_raw_breakpoint): Likewise.
2460 (set_breakpoint_data): Remove.
2461 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2462 (check_mem_read): Adjust for kind call bp_size.
2463 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2464 (clone_one_breakpoint): Adjust for kind.
2465 * mem-break.h (set_gdb_breakpoint): Likewise.
2466 (delete_gdb_breakpoint): Likewise.
2467 * server.c (process_serial_event): Likewise.
2468
2469 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2470
2471 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2472 (struct linux_target_ops) <breakpoint>: Remove.
2473 (struct linux_target_ops) <breakpoint_len>: Remove.
2474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2476 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2477 (arm_sw_breakpoint_from_kind): New function.
2478 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2479 (struct linux_target_ops) <breakpoint>: Remove.
2480 (struct linux_target_ops) <breakpoint_len>: Remove.
2481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2483 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2484 (struct linux_target_ops) <breakpoint>: Remove.
2485 (struct linux_target_ops) <breakpoint_len>: Remove.
2486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2488 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2489 (struct linux_target_ops) <breakpoint>: Remove.
2490 (struct linux_target_ops) <breakpoint_len>: Remove.
2491 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2492 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2493 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2494 and sw_breakpoint_from_kind to increment the pc.
2495 (linux_breakpoint_kind_from_pc): New function.
2496 (linux_sw_breakpoint_from_kind): New function.
2497 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2498 (initialize_low): Call breakpoint_kind_from_pc and
2499 sw_breakpoint_from_kind to replace breakpoint_data/len.
2500 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2501 New field.
2502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2503 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2504 (struct linux_target_ops) <breakpoint>: Remove.
2505 (struct linux_target_ops) <breakpoint_len>: Remove.
2506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2508 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2509 (struct linux_target_ops) <breakpoint>: Remove.
2510 (struct linux_target_ops) <breakpoint_len>: Remove.
2511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2513 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2514 (struct linux_target_ops) <breakpoint>: Remove.
2515 (struct linux_target_ops) <breakpoint_len>: Remove.
2516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2518 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2519 (struct linux_target_ops) <breakpoint>: Remove.
2520 (struct linux_target_ops) <breakpoint_len>: Remove.
2521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2523 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2524 (struct linux_target_ops) <breakpoint>: Remove.
2525 (struct linux_target_ops) <breakpoint_len>: Remove.
2526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2528 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2529 (struct linux_target_ops) <breakpoint>: Remove.
2530 (struct linux_target_ops) <breakpoint_len>: Remove.
2531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2533 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2534 (struct linux_target_ops) <breakpoint>: Remove.
2535 (struct linux_target_ops) <breakpoint_len>: Remove.
2536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2538 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2539 (struct linux_target_ops) <breakpoint>: Remove.
2540 (struct linux_target_ops) <breakpoint_len>: Remove.
2541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2543 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2544 (struct linux_target_ops) <breakpoint>: Remove.
2545 (struct linux_target_ops) <breakpoint_len>: Remove.
2546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2548 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2549 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2550 (struct linux_target_ops) <breakpoint>: Remove.
2551 (struct linux_target_ops) <breakpoint_len>: Remove.
2552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2554 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2555 (struct linux_target_ops) <breakpoint>: Remove.
2556 (struct linux_target_ops) <breakpoint_len>: Remove.
2557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2558 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2559
2560 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2561
2562 * linux-cris-low.c (cris_get_pc): Remove void arg.
2563
2564 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2565
2566 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2567 variable name.
2568
2569 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2570
2571 * inferiors.c (thread_pid_matches_callback): New function.
2572 (find_thread_process): New function.
2573 (remove_thread): Reset current_thread.
2574 (remove_process): Assert threads have been removed first.
2575
2576 2015-10-15 Yao Qi <yao.qi@linaro.org>
2577
2578 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2579 if it is 3.
2580 (aarch64_remove_point): Likewise.
2581 * regcache.c (regcache_register_size): New function.
2582
2583 2015-10-12 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-aarch64-low.c: Update all callers as emit_load_store
2586 is renamed to aarch64_emit_load_store.
2587
2588 2015-10-12 Yao Qi <yao.qi@linaro.org>
2589
2590 * linux-aarch64-low.c: Update all callers of function renaming
2591 from emit_insn to aarch64_emit_insn.
2592
2593 2015-10-12 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2596 arch/aarch64-insn.h.
2597 (struct aarch64_memory_operand): Likewise.
2598 (ENCODE): Likewise.
2599 (emit_insn): Move to arch/aarch64-insn.c.
2600 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2601 (emit_load_store): Move to arch/aarch64-insn.c.
2602 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2603 (can_encode_int32): Remove.
2604
2605 2015-10-12 Yao Qi <yao.qi@linaro.org>
2606
2607 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2608 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2609 (aarch64_relocate_instruction): Likewise.
2610 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2611 (struct aarch64_insn_visitor): Likewise.
2612
2613 2015-10-12 Yao Qi <yao.qi@linaro.org>
2614
2615 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2616 (struct aarch64_insn_visitor): New.
2617 (struct aarch64_insn_relocation_data): New.
2618 (aarch64_ftrace_insn_reloc_b): New function.
2619 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2620 (aarch64_ftrace_insn_reloc_cb): Likewise.
2621 (aarch64_ftrace_insn_reloc_tb): Likewise.
2622 (aarch64_ftrace_insn_reloc_adr): Likewise.
2623 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2624 (aarch64_ftrace_insn_reloc_others): Likewise.
2625 (visitor): New.
2626 (aarch64_relocate_instruction): Use visitor.
2627
2628 2015-10-12 Yao Qi <yao.qi@linaro.org>
2629
2630 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2631 int. Add argument buf.
2632 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2633 aarch64_relocate_instruction.
2634
2635 2015-10-12 Yao Qi <yao.qi@linaro.org>
2636
2637 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2638 argument insn. Remove local variable insn. Don't call
2639 target_read_uint32.
2640 (aarch64_install_fast_tracepoint_jump_pad): Call
2641 target_read_uint32.
2642
2643 2015-09-30 Yao Qi <yao.qi@linaro.org>
2644
2645 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2646 (emit_load_store_pair): Likewise.
2647
2648 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2649
2650 * dll.c (match_dll): Add cast(s).
2651 (unloaded_dll): Likewise.
2652 * linux-low.c (second_thread_of_pid_p): Likewise.
2653 (delete_lwp_callback): Likewise.
2654 (count_events_callback): Likewise.
2655 (select_event_lwp_callback): Likewise.
2656 (linux_set_resume_request): Likewise.
2657 * server.c (accumulate_file_name_length): Likewise.
2658 (emit_dll_description): Likewise.
2659 (handle_qxfer_threads_worker): Likewise.
2660 (visit_actioned_threads): Likewise.
2661 * thread-db.c (any_thread_of): Likewise.
2662 * tracepoint.c (same_process_p): Likewise.
2663 (match_blocktype): Likewise.
2664 (build_traceframe_info_xml): Likewise.
2665
2666 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2667
2668 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2669 assignment.
2670 (gdb_unparse_agent_expr): Likewise.
2671 * hostio.c (require_data): Likewise.
2672 (handle_pread): Likewise.
2673 * linux-low.c (disable_regset): Likewise.
2674 (fetch_register): Likewise.
2675 (store_register): Likewise.
2676 (get_dynamic): Likewise.
2677 (linux_qxfer_libraries_svr4): Likewise.
2678 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2679 (set_fast_tracepoint_jump): Likewise.
2680 (uninsert_fast_tracepoint_jumps_at): Likewise.
2681 (reinsert_fast_tracepoint_jumps_at): Likewise.
2682 (validate_inserted_breakpoint): Likewise.
2683 (clone_agent_expr): Likewise.
2684 * regcache.c (init_register_cache): Likewise.
2685 * remote-utils.c (putpkt_binary_1): Likewise.
2686 (decode_M_packet): Likewise.
2687 (decode_X_packet): Likewise.
2688 (look_up_one_symbol): Likewise.
2689 (relocate_instruction): Likewise.
2690 (monitor_output): Likewise.
2691 * server.c (handle_search_memory): Likewise.
2692 (handle_qxfer_exec_file): Likewise.
2693 (handle_qxfer_libraries): Likewise.
2694 (handle_qxfer): Likewise.
2695 (handle_query): Likewise.
2696 (handle_v_cont): Likewise.
2697 (handle_v_run): Likewise.
2698 (captured_main): Likewise.
2699 * target.c (write_inferior_memory): Likewise.
2700 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2701 * tracepoint.c (init_trace_buffer): Likewise.
2702 (add_tracepoint_action): Likewise.
2703 (add_traceframe): Likewise.
2704 (add_traceframe_block): Likewise.
2705 (cmd_qtdpsrc): Likewise.
2706 (cmd_qtdv): Likewise.
2707 (cmd_qtstatus): Likewise.
2708 (response_source): Likewise.
2709 (response_tsv): Likewise.
2710 (cmd_qtnotes): Likewise.
2711 (gdb_collect): Likewise.
2712 (initialize_tracepoint): Likewise.
2713
2714 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2715
2716 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2717 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2718 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2719 <NOP>: New.
2720 (enum aarch64_condition_codes): New enum.
2721 (w0): New static global.
2722 (fp): Likewise.
2723 (lr): Likewise.
2724 (struct aarch64_memory_operand) <type>: New
2725 MEMORY_OPERAND_POSTINDEX type.
2726 (postindex_memory_operand): New helper function.
2727 (emit_ret): New function.
2728 (emit_load_store_pair): New function, factored out of emit_stp
2729 with support for MEMORY_OPERAND_POSTINDEX.
2730 (emit_stp): Rewrite using emit_load_store_pair.
2731 (emit_ldp): New function.
2732 (emit_load_store): Likewise.
2733 (emit_ldr): Mention post-index instruction in comment.
2734 (emit_ldrh): New function.
2735 (emit_ldrb): New function.
2736 (emit_ldrsw): Mention post-index instruction in comment.
2737 (emit_str): Likewise.
2738 (emit_subs): New function.
2739 (emit_cmp): Likewise.
2740 (emit_and): Likewise.
2741 (emit_orr): Likewise.
2742 (emit_orn): Likewise.
2743 (emit_eor): Likewise.
2744 (emit_mvn): Likewise.
2745 (emit_lslv): Likewise.
2746 (emit_lsrv): Likewise.
2747 (emit_asrv): Likewise.
2748 (emit_mul): Likewise.
2749 (emit_sbfm): Likewise.
2750 (emit_sbfx): Likewise.
2751 (emit_ubfm): Likewise.
2752 (emit_ubfx): Likewise.
2753 (emit_csinc): Likewise.
2754 (emit_cset): Likewise.
2755 (emit_nop): Likewise.
2756 (emit_ops_insns): New helper function.
2757 (emit_pop): Likewise.
2758 (emit_push): Likewise.
2759 (aarch64_emit_prologue): New function.
2760 (aarch64_emit_epilogue): Likewise.
2761 (aarch64_emit_add): Likewise.
2762 (aarch64_emit_sub): Likewise.
2763 (aarch64_emit_mul): Likewise.
2764 (aarch64_emit_lsh): Likewise.
2765 (aarch64_emit_rsh_signed): Likewise.
2766 (aarch64_emit_rsh_unsigned): Likewise.
2767 (aarch64_emit_ext): Likewise.
2768 (aarch64_emit_log_not): Likewise.
2769 (aarch64_emit_bit_and): Likewise.
2770 (aarch64_emit_bit_or): Likewise.
2771 (aarch64_emit_bit_xor): Likewise.
2772 (aarch64_emit_bit_not): Likewise.
2773 (aarch64_emit_equal): Likewise.
2774 (aarch64_emit_less_signed): Likewise.
2775 (aarch64_emit_less_unsigned): Likewise.
2776 (aarch64_emit_ref): Likewise.
2777 (aarch64_emit_if_goto): Likewise.
2778 (aarch64_emit_goto): Likewise.
2779 (aarch64_write_goto_address): Likewise.
2780 (aarch64_emit_const): Likewise.
2781 (aarch64_emit_call): Likewise.
2782 (aarch64_emit_reg): Likewise.
2783 (aarch64_emit_pop): Likewise.
2784 (aarch64_emit_stack_flush): Likewise.
2785 (aarch64_emit_zero_ext): Likewise.
2786 (aarch64_emit_swap): Likewise.
2787 (aarch64_emit_stack_adjust): Likewise.
2788 (aarch64_emit_int_call_1): Likewise.
2789 (aarch64_emit_void_call_2): Likewise.
2790 (aarch64_emit_eq_goto): Likewise.
2791 (aarch64_emit_ne_goto): Likewise.
2792 (aarch64_emit_lt_goto): Likewise.
2793 (aarch64_emit_le_goto): Likewise.
2794 (aarch64_emit_gt_goto): Likewise.
2795 (aarch64_emit_ge_got): Likewise.
2796 (aarch64_emit_ops_impl): New static global variable.
2797 (aarch64_emit_ops): New target function, return
2798 &aarch64_emit_ops_impl.
2799 (struct linux_target_ops): Install it.
2800
2801 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2802
2803 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2804 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2805 aarch64-ipa.o.
2806 * linux-aarch64-ipa.c: New file.
2807 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2808 and endian.h.
2809 (aarch64_get_thread_area): New target method.
2810 (extract_signed_bitfield): New helper function.
2811 (aarch64_decode_ldr_literal): New function.
2812 (enum aarch64_opcodes): New enum.
2813 (struct aarch64_register): New struct.
2814 (struct aarch64_operand): New struct.
2815 (x0): New static global.
2816 (x1): Likewise.
2817 (x2): Likewise.
2818 (x3): Likewise.
2819 (x4): Likewise.
2820 (w2): Likewise.
2821 (ip0): Likewise.
2822 (sp): Likewise.
2823 (xzr): Likewise.
2824 (aarch64_register): New helper function.
2825 (register_operand): Likewise.
2826 (immediate_operand): Likewise.
2827 (struct aarch64_memory_operand): New struct.
2828 (offset_memory_operand): New helper function.
2829 (preindex_memory_operand): Likewise.
2830 (enum aarch64_system_control_registers): New enum.
2831 (ENCODE): New macro.
2832 (emit_insn): New helper function.
2833 (emit_b): New function.
2834 (emit_bcond): Likewise.
2835 (emit_cb): Likewise.
2836 (emit_tb): Likewise.
2837 (emit_blr): Likewise.
2838 (emit_stp): Likewise.
2839 (emit_ldp_q_offset): Likewise.
2840 (emit_stp_q_offset): Likewise.
2841 (emit_load_store): Likewise.
2842 (emit_ldr): Likewise.
2843 (emit_ldrsw): Likewise.
2844 (emit_str): Likewise.
2845 (emit_ldaxr): Likewise.
2846 (emit_stxr): Likewise.
2847 (emit_stlr): Likewise.
2848 (emit_data_processing_reg): Likewise.
2849 (emit_data_processing): Likewise.
2850 (emit_add): Likewise.
2851 (emit_sub): Likewise.
2852 (emit_mov): Likewise.
2853 (emit_movk): Likewise.
2854 (emit_mov_addr): Likewise.
2855 (emit_mrs): Likewise.
2856 (emit_msr): Likewise.
2857 (emit_sevl): Likewise.
2858 (emit_wfe): Likewise.
2859 (append_insns): Likewise.
2860 (can_encode_int32_in): New helper function.
2861 (aarch64_relocate_instruction): New function.
2862 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2863 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2864 (struct linux_target_ops): Install aarch64_get_thread_area,
2865 aarch64_install_fast_tracepoint_jump_pad and
2866 aarch64_get_min_fast_tracepoint_insn_len.
2867
2868 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2869
2870 * Makefile.in (aarch64-insn.o): New rule.
2871 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2872
2873 2015-09-21 Yao Qi <yao.qi@linaro.org>
2874
2875 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2876
2877 2015-09-21 Yao Qi <yao.qi@linaro.org>
2878
2879 * tracepoint.c (max_jump_pad_size): Remove.
2880
2881 2015-09-18 Yao Qi <yao.qi@linaro.org>
2882
2883 * linux-aarch64-low.c: Don't include sys/uio.h.
2884 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2885
2886 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2887
2888 * tracepoint.c (eval_result_type): Change prototype.
2889 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2890
2891 2015-09-15 Pedro Alves <palves@redhat.com>
2892
2893 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2894 Check whether to report exec events instead of checking whether
2895 multiprocess is enabled.
2896
2897 2015-09-15 Pedro Alves <palves@redhat.com>
2898
2899 PR remote/18965
2900 * remote-utils.c (prepare_resume_reply): Merge
2901 TARGET_WAITKIND_VFORK_DONE switch case with the
2902 TARGET_WAITKIND_FORKED case.
2903
2904 2015-09-15 Yao Qi <yao.qi@linaro.org>
2905
2906 * server.c (handle_query): Check string comparison using
2907 "else if" instead of "if".
2908
2909 2015-09-15 Yao Qi <yao.qi@linaro.org>
2910
2911 * server.c (vCont_supported): New global variable.
2912 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2913 matches. Append ";vContSupported+" to own_buf.
2914 (handle_v_requests): Append ";s;S" to own_buf if target supports
2915 hardware single step or vCont_supported is false.
2916 (capture_main): Set vCont_supported to zero.
2917
2918 2015-09-15 Yao Qi <yao.qi@linaro.org>
2919
2920 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2921 it to ...
2922 (linux_supports_hardware_single_step): ... New function.
2923 (linux_target_ops): Update.
2924 * lynx-low.c (lynx_target_ops): Set field
2925 supports_hardware_single_step to target_can_do_hardware_single_step.
2926 * nto-low.c (nto_target_ops): Likewise.
2927 * spu-low.c (spu_target_ops): Likewise.
2928 * win32-low.c (win32_target_ops): Likewise.
2929 * target.c (target_can_do_hardware_single_step): New function.
2930 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2931 Remove. <supports_hardware_single_step>: New field.
2932 (target_supports_conditional_breakpoints): Remove.
2933 (target_supports_hardware_single_step): New macro.
2934 (target_can_do_hardware_single_step): Declare.
2935 * server.c (handle_query): Use target_supports_hardware_single_step
2936 instead of target_supports_conditional_breakpoints.
2937
2938 2015-09-15 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2941 function.
2942 (struct linux_target_ops the_low_target): Install
2943 aarch64_linux_siginfo_fixup.
2944
2945 2015-09-11 Don Breazeal <donb@codesourcery.com>
2946 Luis Machado <lgustavo@codesourcery.com>
2947
2948 * linux-low.c (linux_mourn): Static declaration.
2949 (linux_arch_setup): Move in front of
2950 handle_extended_wait.
2951 (linux_arch_setup_thread): New function.
2952 (handle_extended_wait): Handle exec events. Call
2953 linux_arch_setup_thread. Make event_lwp argument a
2954 pointer-to-a-pointer.
2955 (check_zombie_leaders): Do not check stopped threads.
2956 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2957 (linux_low_filter_event): Add lwp and thread for exec'ing
2958 non-leader thread if leader thread has been deleted.
2959 Refactor code into linux_arch_setup_thread and call it.
2960 Pass child lwp pointer by reference to handle_extended_wait.
2961 (linux_wait_for_event_filtered): Update comment.
2962 (linux_wait_1): Prevent clobbering exec event status.
2963 (linux_supports_exec_events): New function.
2964 (linux_target_ops) <supports_exec_events>: Initialize new member.
2965 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2966 new member.
2967 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2968 * server.c (report_exec_events): New global variable.
2969 (handle_query): Handle qSupported query for exec-events feature.
2970 (captured_main): Initialize report_exec_events.
2971 * server.h (report_exec_events): Declare new global variable.
2972 * target.h (struct target_ops) <supports_exec_events>: New
2973 member.
2974 (target_supports_exec_events): New macro.
2975 * win32-low.c (win32_target_ops) <supports_exec_events>:
2976 Initialize new member.
2977
2978 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2979
2980 * linux-low.c (linux_low_enable_btrace): Remove.
2981 (linux_target_ops): Replace linux_low_enable_btrace with
2982 linux_enable_btrace.
2983
2984 2015-09-03 Yao Qi <yao.qi@linaro.org>
2985
2986 * linux-aarch64-low.c (aarch64_insert_point): Call
2987 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2988 returns true.
2989
2990 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2991
2992 * linux-low.c (check_stopped_by_breakpoint): Use
2993 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2994
2995 2015-08-27 Pedro Alves <palves@redhat.com>
2996
2997 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2998
2999 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3000
3001 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3002 the XNEW-family equivalent.
3003 (compile_bytecodes): Likewise.
3004 * dll.c (loaded_dll): Likewise.
3005 * event-loop.c (append_callback_event): Likewise.
3006 (create_file_handler): Likewise.
3007 (create_file_event): Likewise.
3008 * hostio.c (handle_open): Likewise.
3009 * inferiors.c (add_thread): Likewise.
3010 (add_process): Likewise.
3011 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3012 * linux-arm-low.c (arm_new_process): Likewise.
3013 (arm_new_thread): Likewise.
3014 * linux-low.c (add_to_pid_list): Likewise.
3015 (linux_add_process): Likewise.
3016 (handle_extended_wait): Likewise.
3017 (add_lwp): Likewise.
3018 (enqueue_one_deferred_signal): Likewise.
3019 (enqueue_pending_signal): Likewise.
3020 (linux_resume_one_lwp_throw): Likewise.
3021 (linux_resume_one_thread): Likewise.
3022 (linux_read_memory): Likewise.
3023 (linux_write_memory): Likewise.
3024 * linux-mips-low.c (mips_linux_new_process): Likewise.
3025 (mips_linux_new_thread): Likewise.
3026 (mips_add_watchpoint): Likewise.
3027 * linux-x86-low.c (initialize_low_arch): Likewise.
3028 * lynx-low.c (lynx_add_process): Likewise.
3029 * mem-break.c (set_raw_breakpoint_at): Likewise.
3030 (set_breakpoint): Likewise.
3031 (add_condition_to_breakpoint): Likewise.
3032 (add_commands_to_breakpoint): Likewise.
3033 (clone_agent_expr): Likewise.
3034 (clone_one_breakpoint): Likewise.
3035 * regcache.c (new_register_cache): Likewise.
3036 * remote-utils.c (look_up_one_symbol): Likewise.
3037 * server.c (queue_stop_reply): Likewise.
3038 (start_inferior): Likewise.
3039 (queue_stop_reply_callback): Likewise.
3040 (handle_target_event): Likewise.
3041 * spu-low.c (fetch_ppc_memory): Likewise.
3042 (store_ppc_memory): Likewise.
3043 * target.c (set_target_ops): Likewise.
3044 * thread-db.c (thread_db_load_search): Likewise.
3045 (try_thread_db_load_1): Likewise.
3046 * tracepoint.c (add_tracepoint): Likewise.
3047 (add_tracepoint_action): Likewise.
3048 (create_trace_state_variable): Likewise.
3049 (cmd_qtdpsrc): Likewise.
3050 (cmd_qtro): Likewise.
3051 (add_while_stepping_state): Likewise.
3052 * win32-low.c (child_add_thread): Likewise.
3053 (get_image_name): Likewise.
3054
3055 2015-08-25 Yao Qi <yao.qi@linaro.org>
3056
3057 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3058
3059 2015-08-25 Yao Qi <yao.qi@linaro.org>
3060
3061 * Makefile.in (aarch64-linux.o): New rule.
3062 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3063 srv_tgtobj.
3064 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3065 (aarch64_init_debug_reg_state): Make it extern.
3066 (aarch64_linux_prepare_to_resume): Remove.
3067
3068 2015-08-25 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3071 lwp_arch_private_info and ptid_of_lwp.
3072
3073 2015-08-25 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3076 Find proc_info by find_process_pid. All callers updated.
3077
3078 2015-08-25 Yao Qi <yao.qi@linaro.org>
3079
3080 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3081 Remove.
3082 (debug_reg_change_callback): Remove.
3083 (aarch64_notify_debug_reg_change): Remove.
3084
3085 2015-08-25 Yao Qi <yao.qi@linaro.org>
3086
3087 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3088 Call current_lwp_ptid.
3089
3090 2015-08-25 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-aarch64-low.c (debug_reg_change_callback): Use
3093 debug_printf.
3094
3095 2015-08-25 Yao Qi <yao.qi@linaro.org>
3096
3097 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3098
3099 2015-08-25 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3102
3103 2015-08-25 Yao Qi <yao.qi@linaro.org>
3104
3105 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3106 the code.
3107
3108 2015-08-25 Yao Qi <yao.qi@linaro.org>
3109
3110 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3111 Remove.
3112 (debug_reg_change_callback): Remove argument entry and add argument
3113 lwp. Remove local variable thread. Don't print thread id in the
3114 debugging output. Don't check whether pid of thread equals to pid.
3115 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3116 iterate_over_lwps instead find_inferior.
3117
3118 2015-08-24 Pedro Alves <palves@redhat.com>
3119
3120 * inferiors.c (get_first_process): New function.
3121 * inferiors.h (get_first_process): New declaration.
3122 * remote-utils.c (read_ptid): Default to the first process in the
3123 list, instead of to the current thread's process.
3124
3125 2015-08-24 Pedro Alves <palves@redhat.com>
3126
3127 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3128 * event-loop.c: Likewise.
3129 * remote-utils.c: Likewise.
3130 * tracepoint.c: Likewise.
3131
3132 2015-08-24 Pedro Alves <palves@redhat.com>
3133
3134 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3135 ptid_get_lwp.
3136
3137 2015-08-21 Pedro Alves <palves@redhat.com>
3138
3139 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3140 instead of literal 1.
3141
3142 2015-08-21 Pedro Alves <palves@redhat.com>
3143
3144 * tdesc.c (default_description): Explicitly zero-initialize.
3145
3146 2015-08-21 Pedro Alves <palves@redhat.com>
3147
3148 PR gdb/18749
3149 * inferiors.c (remove_thread): Discard any pending stop reply for
3150 this thread.
3151 * server.c (remove_all_on_match_pid): Rename to ...
3152 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3153 instead of a pid.
3154 (discard_queued_stop_replies): Change parameter to a ptid. Now
3155 extern.
3156 (handle_v_kill, kill_inferior_callback, captured_main)
3157 (process_serial_event): Adjust.
3158 * server.h (discard_queued_stop_replies): Declare.
3159
3160 2015-08-21 Pedro Alves <palves@redhat.com>
3161
3162 * linux-low.c (wait_for_sigstop): Always switch to no thread
3163 selected if the previously current thread dies.
3164 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3165 process instead of the current thread's.
3166 * remote-utils.c (input_interrupt): Don't check if there's no
3167 current thread.
3168 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3169 current thread to the general thread fails, error out.
3170 (handle_qxfer_auxv, handle_qxfer_libraries)
3171 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3172 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3173 (handle_query): Check if there's a thread selected instead of
3174 checking whether there's any thread in the thread list.
3175 (handle_qxfer_threads, handle_qxfer_btrace)
3176 (handle_qxfer_btrace_conf): Don't error out early if there's no
3177 thread in the thread list.
3178 (handle_v_cont, myresume): Don't set the current thread to the
3179 continue thread.
3180 (process_serial_event) <Hg handling>: Also set thread_id if the
3181 previous general thread is still alive.
3182 (process_serial_event) <g/G handling>: If setting the current
3183 thread to the general thread fails, error out.
3184 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3185 thread's lwp instead of the current thread's.
3186 * target.c (set_desired_thread): If the desired thread was not
3187 found, leave the current thread pointing to NULL. Return an int
3188 (boolean) indicating success.
3189 * target.h (set_desired_thread): Change return type to int.
3190
3191 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3192
3193 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3194 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3195 #includes.
3196 (ps_get_thread_area): New function.
3197
3198 2015-08-19 Gary Benson <gbenson@redhat.com>
3199
3200 * hostio.c (handle_pread): Do not attempt to read more data
3201 than hostio_reply_with_data can fit in a packet.
3202
3203 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3204
3205 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3206
3207 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3208
3209 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3210
3211 2015-08-06 Pedro Alves <palves@redhat.com>
3212
3213 * tracepoint.c (expr_eval_result): Now an int.
3214
3215 2015-08-06 Pedro Alves <palves@redhat.com>
3216
3217 * gdbthread.h (struct regcache): Forward declare.
3218 (struct thread_info) <regcache_data>: Now a struct regcache
3219 pointer.
3220 * inferiors.c (inferior_regcache_data)
3221 (set_inferior_regcache_data): Now work with struct regcache
3222 pointers.
3223 * inferiors.h (struct regcache): Forward declare.
3224 (inferior_regcache_data, set_inferior_regcache_data): Now work
3225 with struct regcache pointers.
3226 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3227 (free_register_cache_thread): Remove struct regcache pointer
3228 casts.
3229
3230 2015-08-06 Pedro Alves <palves@redhat.com>
3231
3232 * server.c (captured_main): On error, print the exception message
3233 to stderr, and if run_once is set, throw a quit.
3234
3235 2015-08-06 Pedro Alves <palves@redhat.com>
3236
3237 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3238 the current thread.
3239
3240 2015-08-06 Pedro Alves <palves@redhat.com>
3241
3242 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3243 reading beyond the passed in buffer length.
3244
3245 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3246
3247 * tracepoint.c (symbol_list) <required>: Remove.
3248
3249 2015-08-06 Pedro Alves <palves@redhat.com>
3250
3251 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3252 count if stopping and suspending threads.
3253 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3254 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3255 (linux_detach): Complete an ongoing step-over.
3256 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3257 throughout.
3258 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3259 (linux_wait_1): If passing a signal to the inferior after
3260 finishing a step-over, unsuspend and re-resume all lwps. If we
3261 see a single-step event but the thread should be continuing, don't
3262 pass the trap to gdb.
3263 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3264 internal_error instead of gdb_assert.
3265 (enqueue_pending_signal): New function.
3266 (check_ptrace_stopped_lwp_gone): Add debug output.
3267 (start_step_over): Use internal_error instead of gdb_assert.
3268 (complete_ongoing_step_over): New function.
3269 (linux_resume_one_thread): Don't resume a suspended thread.
3270 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3271 it stepping.
3272
3273 2015-08-06 Pedro Alves <palves@redhat.com>
3274
3275 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3276 (linux_thread_alive): Use lwp_is_marked_dead.
3277 (extended_event_reported): Delete.
3278 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3279 instead of extended_event_reported.
3280 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3281 as well.
3282 (lwp_is_marked_dead): New function.
3283 (lwp_running): Use lwp_is_marked_dead.
3284 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3285 comment.
3286
3287 2015-08-06 Pedro Alves <palves@redhat.com>
3288
3289 * linux-low.c (linux_wait_1): Move fork event output out of the
3290 !report_to_gdb check. Pass event_child->waitstatus to
3291 target_waitstatus_to_string instead of ourstatus.
3292
3293 2015-08-04 Yao Qi <yao.qi@linaro.org>
3294
3295 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3296 if current_thread is 32 bit.
3297
3298 2015-08-04 Yao Qi <yao.qi@linaro.org>
3299
3300 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3301 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3302 * server.c (extended_protocol): Remove "static".
3303 * server.h (extended_protocol): Declare it.
3304
3305 2015-08-04 Yao Qi <yao.qi@linaro.org>
3306
3307 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3308 both aarch64 and aarch32.
3309 (aarch64_set_pc): Likewise.
3310
3311 2015-08-04 Yao Qi <yao.qi@linaro.org>
3312
3313 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3314 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3315 arm-with-neon.xml to srv_xmlfiles.
3316 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3317 (is_64bit_tdesc): New function.
3318 (aarch64_linux_read_description): New function.
3319 (aarch64_arch_setup): Call aarch64_linux_read_description.
3320 (regs_info): Rename to regs_info_aarch64.
3321 (aarch64_regs_info): Return right regs_info.
3322 (initialize_low_arch): Call initialize_low_arch_aarch32.
3323
3324 2015-08-04 Yao Qi <yao.qi@linaro.org>
3325
3326 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3327 * linux-aarch32-low.c: New file.
3328 * linux-aarch32-low.h: New file.
3329 * linux-arm-low.c (arm_fill_gregset): Move it to
3330 linux-aarch32-low.c.
3331 (arm_store_gregset): Likewise.
3332 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3333 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3334 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3335 (regs_info): Rename to regs_info_arm.
3336 (arm_regs_info): Return regs_info_aarch32 if
3337 have_ptrace_getregset is 1 and target description is
3338 arm_with_neon or arm_with_vfpv3.
3339 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3340 Call initialize_low_arch_aarch32 instead.
3341
3342 2015-08-04 Yao Qi <yao.qi@linaro.org>
3343
3344 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3345 * linux-low.c: ... here.
3346 * linux-low.h (have_ptrace_getregset): Declare it.
3347
3348 2015-08-04 Pedro Alves <palves@redhat.com>
3349
3350 * thread-db.c (struct thread_db): Use new typedefs.
3351 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3352 CHK calls.
3353 (disable_thread_event_reporting): Cast result of dlsym to
3354 destination function pointer type.
3355 (thread_db_mourn): Use td_ta_delete_ftype.
3356
3357 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3358
3359 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3360 arch variant.
3361 (CDX_BREAKPOINT): Define for R2.
3362 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3363 (the_low_target): Add comments.
3364
3365 2015-07-30 Yao Qi <yao.qi@linaro.org>
3366
3367 * linux-arm-low.c (arm_hwcap): Remove it.
3368 (arm_read_description): New local variable arm_hwcap. Don't
3369 set arm_hwcap to zero.
3370
3371 2015-07-30 Yao Qi <yao.qi@linaro.org>
3372
3373 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3374 Use regcache->tdesc instead.
3375 (arm_store_wmmxregset): Likewise.
3376 (arm_fill_vfpregset): Likewise.
3377 (arm_store_vfpregset): Likewise.
3378
3379 2015-07-30 Yao Qi <yao.qi@linaro.org>
3380
3381 * linux-arm-low.c: Include arch/arm.h.
3382 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3383 (arm_store_gregset): Likewise.
3384
3385 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3386
3387 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3388 ptrace's 4th parameter.
3389
3390 2015-07-27 Yao Qi <yao.qi@linaro.org>
3391
3392 * configure.srv (case aarch64*-*-linux*): Don't set
3393 srv_linux_usrregs.
3394
3395 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3396
3397 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3398 sys/ptrace.h.
3399 * linux-arm-low.c: Likewise.
3400 * linux-cris-low.c: Likewise.
3401 * linux-crisv32-low.c: Likewise.
3402 * linux-low.c: Likewise.
3403 * linux-m68k-low.c: Likewise.
3404 * linux-mips-low.c: Likewise.
3405 * linux-nios2-low.c: Likewise.
3406 * linux-s390-low.c: Likewise.
3407 * linux-sparc-low.c: Likewise.
3408 * linux-tic6x-low.c: Likewise.
3409 * linux-tile-low.c: Likewise.
3410 * linux-x86-low.c: Likewise.
3411
3412 2015-07-24 Pedro Alves <palves@redhat.com>
3413
3414 * config.in: Regenerate.
3415 * configure: Regenerate.
3416
3417 2015-07-24 Pedro Alves <palves@redhat.com>
3418
3419 * acinclude.m4: Include ../ptrace.m4.
3420 * configure.ac: Call GDB_AC_PTRACE.
3421 * config.in, configure: Regenerate.
3422
3423 2015-07-24 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-low.c (linux_create_inferior): Remove setting to
3426 proc->priv->new_inferior.
3427 (linux_attach): Likewise.
3428 (linux_low_filter_event): Likewise.
3429 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3430
3431 2015-07-24 Yao Qi <yao.qi@linaro.org>
3432
3433 * linux-low.c (linux_arch_setup): New function.
3434 (linux_low_filter_event): If proc->tdesc is NULL and
3435 proc->attached is true, call the_low_target.arch_setup.
3436 Otherwise, keep status pending, and return.
3437 (linux_resume_one_lwp_throw): Don't call get_pc if
3438 thread->while_stepping isn't NULL. Don't call
3439 get_thread_regcache if proc->tdesc is NULL.
3440 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3441 (linux_target_ops): Install arch_setup.
3442 * server.c (start_inferior): Call the_target->arch_setup.
3443 * target.h (struct target_ops) <arch_setup>: New field.
3444 (target_arch_setup): New marco.
3445 * lynx-low.c (lynx_target_ops): Update.
3446 * nto-low.c (nto_target_ops): Update.
3447 * spu-low.c (spu_target_ops): Update.
3448 * win32-low.c (win32_target_ops): Update.
3449
3450 2015-07-24 Yao Qi <yao.qi@linaro.org>
3451
3452 * linux-low.c (linux_add_process): Don't set
3453 proc->priv->new_inferior.
3454 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3455 (linux_attach): Likewise.
3456
3457 2015-07-24 Yao Qi <yao.qi@linaro.org>
3458
3459 * server.c (start_inferior): Code refactor.
3460
3461 2015-07-24 Yao Qi <yao.qi@linaro.org>
3462
3463 * server.c (process_serial_event): Set general_thread.
3464
3465 2015-07-21 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3468 aarch64_linux_get_debug_reg_capacity.
3469
3470 2015-07-17 Yao Qi <yao.qi@linaro.org>
3471
3472 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3473 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3474 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3475 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3476 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3477 (AARCH64_HWP_ALIGNMENT): Likewise.
3478 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3479 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3480 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3481 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3482 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3483 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3484 (struct aarch64_debug_reg_state): Likewise.
3485 (struct arch_lwp_info): Likewise.
3486 (aarch64_align_watchpoint): Likewise.
3487 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3488 (aarch64_watchpoint_length): Likewise.
3489 (aarch64_point_encode_ctrl_reg): Likewise
3490 (aarch64_point_is_aligned): Likewise.
3491 (aarch64_align_watchpoint): Likewise.
3492 (aarch64_linux_set_debug_regs):
3493 (aarch64_dr_state_insert_one_point): Likewise.
3494 (aarch64_dr_state_remove_one_point): Likewise.
3495 (aarch64_handle_breakpoint): Likewise.
3496 (aarch64_handle_aligned_watchpoint): Likewise.
3497 (aarch64_handle_unaligned_watchpoint): Likewise.
3498 (aarch64_handle_watchpoint): Likewise.
3499
3500 2015-07-17 Yao Qi <yao.qi@linaro.org>
3501
3502 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3503 and don't aarch64_get_debug_reg_state. All callers update.
3504 (aarch64_handle_aligned_watchpoint): Likewise.
3505 (aarch64_handle_unaligned_watchpoint): Likewise.
3506 (aarch64_handle_watchpoint): Likewise.
3507 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3508 (aarch64_remove_point): Likewise.
3509
3510 2015-07-17 Yao Qi <yao.qi@linaro.org>
3511
3512 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3513 debug_printf.
3514 (aarch64_handle_unaligned_watchpoint): Likewise.
3515
3516 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3517
3518 Revert the previous 3 commits:
3519 Move gdb_regex* to common/
3520 Move linux_find_memory_regions_full & co.
3521 gdbserver build-id attribute generator
3522
3523 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3524 Jan Kratochvil <jan.kratochvil@redhat.com>
3525
3526 gdbserver build-id attribute generator.
3527 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3528 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3529 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3530 (find_phdr): New.
3531 (get_dynamic): Use find_pdhr to traverse program headers.
3532 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3533 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3534 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3535 (get_hex_build_id): New.
3536 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3537 to reply XML document.
3538
3539 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3540 Jan Kratochvil <jan.kratochvil@redhat.com>
3541
3542 * target.c: Include target/target-utils.h and fcntl.h.
3543 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3544 (target_fileio_read_stralloc): New functions.
3545
3546 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3547
3548 * Makefile.in (OBS): Add gdb_regex.o.
3549 (gdb_regex.o): New.
3550 * config.in: Rebuilt.
3551 * configure: Rebuilt.
3552
3553 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3554 Jan Kratochvil <jan.kratochvil@redhat.com>
3555
3556 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3557 * Makefile.in (OBS): Add target-utils.o.
3558 (linux-maps.o, target-utils.o): New.
3559 * configure.srv (srv_linux_obj): Add linux-maps.o.
3560
3561 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3562
3563 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3564 function, return 1.
3565 (the_low_target): Install it.
3566
3567 2015-07-14 Pedro Alves <palves@redhat.com>
3568
3569 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3570 Instead, ignore ECHILD, and throw an error for other errnos.
3571
3572 2015-07-10 Pedro Alves <palves@redhat.com>
3573
3574 * event-loop.c (struct callback_event) <data>: Change type to
3575 gdb_client_data instance instead of gdb_client_data pointer.
3576 (append_callback_event): Adjust.
3577
3578 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3579
3580 * linux-aarch64-low.c: Add comments for each linux_target_ops
3581 method. Remove comments already covered in target_ops and
3582 linux_target_ops definitions.
3583 (the_low_target): Add comments for each unimplemented method.
3584
3585 2015-07-09 Yao Qi <yao.qi@linaro.org>
3586
3587 * linux-aarch64-low.c (aarch64_regmap): Remove.
3588 (aarch64_usrregs_info): Remove.
3589 (regs_info): Set field usrregs to NULL.
3590
3591 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3592
3593 * linux-low.c: Include "rsp-low.h"
3594 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3595 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3596 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3597 (handle_btrace_enable_pt): New.
3598 (handle_btrace_general_set): Support "pt".
3599 (handle_btrace_conf_general_set): Support "pt:size".
3600
3601 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3602
3603 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3604 Z_PACKET_SW_BP.
3605
3606 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3607
3608 * linux-aarch64-low.c: Remove comment about endianness.
3609 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3610 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3611 memcmp.
3612
3613 2015-06-24 Gary Benson <gbenson@redhat.com>
3614
3615 * linux-i386-ipa.c (stdint.h): Do not include.
3616 * lynx-i386-low.c (stdint.h): Likewise.
3617 * lynx-ppc-low.c (stdint.h): Likewise.
3618 * mem-break.c (stdint.h): Likewise.
3619 * thread-db.c (stdint.h): Likewise.
3620 * tracepoint.c (stdint.h): Likewise.
3621 * win32-low.c (stdint.h): Likewise.
3622
3623 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3624
3625 * server.c (write_qxfer_response): Update call to
3626 remote_escape_output.
3627
3628 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3629 Jan Kratochvil <jan.kratochvil@redhat.com>
3630
3631 Merge multiple hex conversions.
3632 * gdbreplay.c (tohex): Rename to 'fromhex'.
3633 (logchar): Use fromhex.
3634
3635 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3636
3637 * server.c (handle_qxfer_libraries): Set `version' attribute for
3638 <library-list>.
3639
3640 2015-06-10 Gary Benson <gbenson@redhat.com>
3641
3642 * target.h (struct target_ops) <multifs_open>: New field.
3643 <multifs_unlink>: Likewise.
3644 <multifs_readlink>: Likewise.
3645 * linux-low.c (nat/linux-namespaces.h): New include.
3646 (linux_target_ops): Initialize the_target->multifs_open,
3647 the_target->multifs_unlink and the_target->multifs_readlink.
3648 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3649 * hostio.c (hostio_fs_pid): New static variable.
3650 (hostio_handle_new_gdb_connection): New function.
3651 (handle_setfs): Likewise.
3652 (handle_open): Use the_target->multifs_open as appropriate.
3653 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3654 (handle_readlink): Use the_target->multifs_readlink as
3655 appropriate.
3656 (handle_vFile): Handle vFile:setfs packets.
3657 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3658 after target_handle_new_gdb_connection.
3659
3660 2015-06-10 Gary Benson <gbenson@redhat.com>
3661
3662 * configure.ac (AC_CHECK_FUNCS): Add setns.
3663 * config.in: Regenerate.
3664 * configure: Likewise.
3665 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3666 (linux-namespaces.o): New rule.
3667 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3668
3669 2015-06-09 Gary Benson <gbenson@redhat.com>
3670
3671 * hostio.c (handle_open): Process mode argument with
3672 fileio_to_host_mode.
3673
3674 2015-06-01 Yao Qi <yao.qi@linaro.org>
3675
3676 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3677 * linux-x86-low.c: Likewise.
3678
3679 2015-05-28 Don Breazeal <donb@codesourcery.com>
3680
3681 * linux-low.c (handle_extended_wait): Initialize
3682 thread_info.last_resume_kind for new fork children.
3683
3684 2015-05-15 Pedro Alves <palves@redhat.com>
3685
3686 * target.h (target_handle_new_gdb_connection): Rewrite using if
3687 wrapped in do/while.
3688
3689 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3690
3691 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3692 * configure, config.in: Regenerate.
3693 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3694 Declare typedef.
3695
3696 2015-05-12 Don Breazeal <donb@codesourcery.com>
3697
3698 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3699 PTRACE_EVENT_VFORK_DONE.
3700 (linux_low_ptrace_options, extended_event_reported): Add vfork
3701 events.
3702 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3703 and "vforkdone" for RSP 'T' Stop Reply Packet.
3704 * server.h (report_vfork_events): Declare
3705 global variable.
3706
3707 2015-05-12 Don Breazeal <donb@codesourcery.com>
3708
3709 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3710 (the_low_target) <new_fork>: Initialize new member.
3711 * linux-arm-low.c (arm_new_fork): New function.
3712 (the_low_target) <new_fork>: Initialize new member.
3713 * linux-low.c (handle_extended_wait): Call new target function
3714 new_fork.
3715 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3716 * linux-mips-low.c (mips_add_watchpoint): New function
3717 extracted from mips_insert_point.
3718 (the_low_target) <new_fork>: Initialize new member.
3719 (mips_linux_new_fork): New function.
3720 (mips_insert_point): Call mips_add_watchpoint.
3721 * linux-x86-low.c (x86_linux_new_fork): New function.
3722 (the_low_target) <new_fork>: Initialize new member.
3723
3724 2015-05-12 Don Breazeal <donb@codesourcery.com>
3725
3726 * linux-low.c (handle_extended_wait): Implement return value,
3727 rename argument 'event_child' to 'event_lwp', handle
3728 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3729 (linux_low_ptrace_options): New function.
3730 (linux_low_filter_event): Call linux_low_ptrace_options,
3731 use different argument fo linux_enable_event_reporting,
3732 use return value from handle_extended_wait.
3733 (extended_event_reported): New function.
3734 (linux_wait_1): Call extended_event_reported and set
3735 status to report fork events.
3736 (linux_write_memory): Add pid to debug message.
3737 (reset_lwp_ptrace_options_callback): New function.
3738 (linux_handle_new_gdb_connection): New function.
3739 (linux_target_ops): Initialize new structure member.
3740 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3741 * lynx-low.c: Initialize new structure member.
3742 * remote-utils.c (prepare_resume_reply): Implement stop reason
3743 "fork" for "T" stop message.
3744 * server.c (handle_query): Call handle_new_gdb_connection.
3745 * server.h (report_fork_events): Declare global flag.
3746 * target.h (struct target_ops) <handle_new_gdb_connection>:
3747 New member.
3748 (target_handle_new_gdb_connection): New macro.
3749 * win32-low.c: Initialize new structure member.
3750
3751 2015-05-12 Don Breazeal <donb@codesourcery.com>
3752
3753 * mem-break.c (APPEND_TO_LIST): Define macro.
3754 (clone_agent_expr): New function.
3755 (clone_one_breakpoint): New function.
3756 (clone_all_breakpoints): New function.
3757 * mem-break.h: Declare new functions.
3758
3759 2015-05-12 Don Breazeal <donb@codesourcery.com>
3760
3761 * linux-low.c (linux_supports_fork_events): New function.
3762 (linux_supports_vfork_events): New function.
3763 (linux_target_ops): Initialize new structure members.
3764 (initialize_low): Call linux_check_ptrace_features.
3765 * lynx-low.c (lynx_target_ops): Initialize new structure
3766 members.
3767 * server.c (report_fork_events, report_vfork_events):
3768 New global flags.
3769 (handle_query): Add new features to qSupported packet and
3770 response.
3771 (captured_main): Initialize new global variables.
3772 * target.h (struct target_ops) <supports_fork_events>:
3773 New member.
3774 <supports_vfork_events>: New member.
3775 (target_supports_fork_events): New macro.
3776 (target_supports_vfork_events): New macro.
3777 * win32-low.c (win32_target_ops): Initialize new structure
3778 members.
3779
3780 2015-05-12 Gary Benson <gbenson@redhat.com>
3781
3782 * server.c (handle_qxfer_exec_file): Use current process
3783 if annex is empty.
3784
3785 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3786
3787 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3788 Remove HAVE_PTRACE_GETREGS conditionals.
3789 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3790 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3791
3792 2015-05-08 Yao Qi <yao.qi@linaro.org>
3793
3794 * linux-low.c (linux_supports_conditional_breakpoints): New
3795 function.
3796 (linux_target_ops): Install new target method.
3797 * lynx-low.c (lynx_target_ops): Install NULL hook for
3798 supports_conditional_breakpoints.
3799 * nto-low.c (nto_target_ops): Likewise.
3800 * spu-low.c (spu_target_ops): Likewise.
3801 * win32-low.c (win32_target_ops): Likewise.
3802 * server.c (handle_query): Check
3803 target_supports_conditional_breakpoints.
3804 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3805 New field.
3806 (target_supports_conditional_breakpoints): New macro.
3807
3808 2015-05-06 Pedro Alves <palves@redhat.com>
3809
3810 PR server/18081
3811 * server.c (start_inferior): If the process exits, mourn it.
3812
3813 2015-04-21 Gary Benson <gbenson@redhat.com>
3814
3815 * hostio.c (fileio_open_flags_to_host): Factored out to
3816 fileio_to_host_openflags in common/fileio.c. Single use
3817 updated.
3818
3819 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3820
3821 * linux-xtensa-low.c (xtensa_fill_gregset)
3822 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3823 XCHAL_HAVE_LOOP.
3824
3825 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3826
3827 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3828 (regs_info): Replace usrregs pointer with NULL.
3829
3830 2015-04-17 Gary Benson <gbenson@redhat.com>
3831
3832 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3833 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3834 * server.c (handle_qxfer_exec_file): New function.
3835 (qxfer_packets): Add exec-file entry.
3836 (handle_query): Report qXfer:exec-file:read as supported packet.
3837
3838 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3839
3840 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3841
3842 2015-04-09 Gary Benson <gbenson@redhat.com>
3843
3844 * hostio-errno.c (errno_to_fileio_error): Remove function.
3845 Update caller to use remote_fileio_to_fio_error.
3846
3847 2015-04-09 Yao Qi <yao.qi@linaro.org>
3848
3849 * linux-low.c (linux_insert_point): Call
3850 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3851 (linux_remove_point): Call remove_memory_breakpoint if type is
3852 raw_bkpt_type_sw.
3853 * linux-x86-low.c (x86_insert_point): Don't call
3854 insert_memory_breakpoint.
3855 (x86_remove_point): Don't call remove_memory_breakpoint.
3856
3857 2015-04-01 Pedro Alves <palves@redhat.com>
3858 Cleber Rosa <crosa@redhat.com>
3859
3860 * server.c (gdbserver_usage): Reorganize and extend the usage
3861 message.
3862
3863 2015-03-24 Pedro Alves <palves@redhat.com>
3864
3865 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3866 output. Also dump TRAP_TRACE.
3867 (linux_low_filter_event): In debug output, distinguish a
3868 resume_stop SIGSTOP from a delayed SIGSTOP.
3869
3870 2015-03-24 Gary Benson <gbenson@redhat.com>
3871
3872 * linux-x86-low.c (x86_linux_new_thread): Moved to
3873 nat/x86-linux.c.
3874 (x86_linux_prepare_to_resume): Likewise.
3875
3876 2015-03-24 Gary Benson <gbenson@redhat.com>
3877
3878 * Makefile.in (x86-linux-dregs.o): New rule.
3879 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3880 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3881 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3882 (x86_linux_dr_get): Likewise.
3883 (x86_linux_dr_set): Likewise.
3884 (update_debug_registers_callback): Likewise.
3885 (x86_linux_dr_set_addr): Likewise.
3886 (x86_linux_dr_get_addr): Likewise.
3887 (x86_linux_dr_set_control): Likewise.
3888 (x86_linux_dr_get_control): Likewise.
3889 (x86_linux_dr_get_status): Likewise.
3890 (x86_linux_update_debug_registers): Likewise.
3891
3892 2015-03-24 Gary Benson <gbenson@redhat.com>
3893
3894 * linux-x86-low.c (x86_linux_update_debug_registers):
3895 New function, factored out from...
3896 (x86_linux_prepare_to_resume): ...this.
3897
3898 2015-03-24 Gary Benson <gbenson@redhat.com>
3899
3900 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3901 (x86_linux_dr_set): Likewise.
3902 (update_debug_registers_callback): Likewise.
3903 (x86_linux_dr_set_addr): Likewise.
3904 (x86_linux_dr_get_addr): Likewise.
3905 (x86_linux_dr_set_control): Likewise.
3906 (x86_linux_dr_get_control): Likewise.
3907 (x86_linux_dr_get_status): Likewise.
3908 (x86_linux_prepare_to_resume): Likewise.
3909
3910 2015-03-24 Gary Benson <gbenson@redhat.com>
3911
3912 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3913 Use perror_with_name. Pass string through gettext.
3914 (x86_linux_dr_set): Likewise.
3915
3916 2015-03-24 Gary Benson <gbenson@redhat.com>
3917
3918 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3919 (x86_linux_dr_set_addr): ...this.
3920 (x86_dr_low_get_addr): Rename to...
3921 (x86_linux_dr_get_addr): ...this.
3922 (x86_dr_low_set_control): Rename to...
3923 (x86_linux_dr_set_control): ...this.
3924 (x86_dr_low_get_control): Rename to...
3925 (x86_linux_dr_get_control): ...this.
3926 (x86_dr_low_get_status): Rename to...
3927 (x86_linux_dr_get_status): ...this.
3928 (x86_dr_low): Update with new function names.
3929
3930 2015-03-24 Gary Benson <gbenson@redhat.com>
3931
3932 * Makefile.in (x86-linux.o): New rule.
3933 * configure.srv: Add x86-linux.o to relevant targets.
3934 * linux-low.c (lwp_set_arch_private_info): New function.
3935 (lwp_arch_private_info): Likewise.
3936 * linux-x86-low.c: Include nat/x86-linux.h.
3937 (arch_lwp_info): Removed structure.
3938 (update_debug_registers_callback):
3939 Use lwp_set_debug_registers_changed.
3940 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3941 and lwp_set_debug_registers_changed.
3942 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3943
3944 2015-03-24 Gary Benson <gbenson@redhat.com>
3945
3946 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3947 * linux-arm-low.c (arm_new_thread): Likewise.
3948 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3949 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3950 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3951 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3952
3953 2015-03-24 Gary Benson <gbenson@redhat.com>
3954
3955 * linux-low.c (ptid_of_lwp): New function.
3956 (lwp_is_stopped): Likewise.
3957 (lwp_stop_reason): Likewise.
3958 * linux-x86-low.c (update_debug_registers_callback):
3959 Use lwp_is_stopped.
3960 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3961 lwp_stop_reason.
3962
3963 2015-03-24 Gary Benson <gbenson@redhat.com>
3964
3965 * linux-low.h (linux_stop_lwp): Remove declaration.
3966
3967 2015-03-24 Gary Benson <gbenson@redhat.com>
3968
3969 * linux-low.h: Include nat/linux-nat.h.
3970 * linux-low.c (iterate_over_lwps_args): New structure.
3971 (iterate_over_lwps_filter): New function.
3972 (iterate_over_lwps): Likewise.
3973 * linux-x86-low.c (update_debug_registers_callback):
3974 Update signature to what iterate_over_lwps expects.
3975 Remove PID check that iterate_over_lwps now performs.
3976 (x86_dr_low_set_addr): Use iterate_over_lwps.
3977 (x86_dr_low_set_control): Likewise.
3978
3979 2015-03-24 Gary Benson <gbenson@redhat.com>
3980
3981 * linux-x86-low.c (x86_debug_reg_state): New function.
3982 (x86_linux_prepare_to_resume): Use the above.
3983
3984 2015-03-24 Gary Benson <gbenson@redhat.com>
3985
3986 * linux-low.c (current_lwp_ptid): New function.
3987 * linux-x86-low.c: Include nat/linux-nat.h.
3988 (x86_dr_low_get_addr): Use current_lwp_ptid.
3989 (x86_dr_low_get_control): Likewise.
3990 (x86_dr_low_get_status): Likewise.
3991
3992 2015-03-20 Pedro Alves <palves@redhat.com>
3993
3994 * tracepoint.c (cmd_qtstatus): Make "str" const.
3995
3996 2015-03-20 Pedro Alves <palves@redhat.com>
3997
3998 * server.c (handle_general_set): Make "req_str" const.
3999
4000 2015-03-19 Pedro Alves <palves@redhat.com>
4001
4002 * linux-low.c (linux_resume_one_lwp): Rename to ...
4003 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4004 instead call perror_with_name.
4005 (check_ptrace_stopped_lwp_gone): New function.
4006 (linux_resume_one_lwp): Reimplement as wrapper around
4007 linux_resume_one_lwp_throw that swallows errors if the LWP is
4008 gone.
4009
4010 2015-03-19 Pedro Alves <palves@redhat.com>
4011
4012 * linux-low.c (count_events_callback, select_event_lwp_callback):
4013 No longer check whether the thread has resume_stop as last resume
4014 kind.
4015
4016 2015-03-19 Pedro Alves <palves@redhat.com>
4017
4018 * linux-low.c (count_events_callback, select_event_lwp_callback):
4019 Use the lwp's status_pending_p field, not the thread's.
4020
4021 2015-03-19 Pedro Alves <palves@redhat.com>
4022
4023 * linux-low.c (select_event_lwp_callback): Update comments to
4024 no longer mention SIGTRAP.
4025
4026 2015-03-18 Gary Benson <gbenson@redhat.com>
4027
4028 * server.c (handle_query): Do not report vFile:fstat as supported.
4029
4030 2015-03-11 Gary Benson <gbenson@redhat.com>
4031
4032 * hostio.c (sys/types.h): New include.
4033 (sys/stat.h): Likewise.
4034 (common-remote-fileio.h): Likewise.
4035 (handle_fstat): New function.
4036 (handle_vFile): Handle vFile:fstat packets.
4037
4038 2015-03-11 Gary Benson <gbenson@redhat.com>
4039
4040 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4041 struct stat.st_blocks and struct stat.st_blksize.
4042 * configure: Regenerate.
4043 * config.in: Likewise.
4044 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4045 (OBS): Add common-remote-fileio.o.
4046 (common-remote-fileio.o): New rule.
4047
4048 2015-03-09 Pedro Alves <palves@redhat.com>
4049
4050 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4051 'struct sockaddr' pointer in 'accept' call.
4052
4053 2015-03-09 Pedro Alves <palves@redhat.com>
4054
4055 Revert:
4056 2015-03-07 Pedro Alves <palves@redhat.com>
4057 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4058 or <winsock2.h> here. Instead include "gdb_socket.h".
4059 (remote_open): Use union gdb_sockaddr_u.
4060 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4061 or <winsock2.h> here. Instead include "gdb_socket.h".
4062 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4063 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4064 or <sys/un.h>.
4065 (init_named_socket, gdb_agent_helper_thread): Use union
4066 gdb_sockaddr_u.
4067
4068 2015-03-07 Pedro Alves <palves@redhat.com>
4069
4070 * configure.ac (build_warnings): Move
4071 -Wdeclaration-after-statement to the C-specific set.
4072 * configure: Regenerate.
4073
4074 2015-03-07 Pedro Alves <palves@redhat.com>
4075
4076 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4077 or <winsock2.h> here. Instead include "gdb_socket.h".
4078 (remote_open): Use union gdb_sockaddr_u.
4079 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4080 or <winsock2.h> here. Instead include "gdb_socket.h".
4081 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4082 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4083 or <sys/un.h>.
4084 (init_named_socket, gdb_agent_helper_thread): Use union
4085 gdb_sockaddr_u.
4086
4087 2015-03-07 Pedro Alves <palves@redhat.com>
4088
4089 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4090 instead.
4091
4092 2015-03-06 Yao Qi <yao.qi@linaro.org>
4093
4094 * linux-aarch64-low.c (aarch64_insert_point): Use
4095 show_debug_regs as a boolean.
4096 (aarch64_remove_point): Likewise.
4097
4098 2015-03-05 Pedro Alves <palves@redhat.com>
4099
4100 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4101 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4102 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4103 * nto-low.c (nto_target_ops): Likewise.
4104 * spu-low.c (spu_target_ops): Likewise.
4105 * win32-low.c (win32_target_ops): Likewise.
4106
4107 2015-03-04 Pedro Alves <palves@redhat.com>
4108
4109 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4110 Decide whether a breakpoint triggered based on the SIGTRAP's
4111 siginfo.si_code.
4112 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4113 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4114 (linux_low_filter_event): Check for breakpoints before checking
4115 watchpoints.
4116 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4117 siginfo.si_code.
4118 (linux_stopped_by_sw_breakpoint)
4119 (linux_supports_stopped_by_sw_breakpoint)
4120 (linux_stopped_by_hw_breakpoint)
4121 (linux_supports_stopped_by_hw_breakpoint): New functions.
4122 (linux_target_ops): Install new target methods.
4123
4124 2015-03-04 Pedro Alves <palves@redhat.com>
4125
4126 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4127 * server.c (swbreak_feature, hwbreak_feature): New globals.
4128 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4129 (captured_main): Clear swbreak_feature and hwbreak_feature.
4130 * server.h (swbreak_feature, hwbreak_feature): Declare.
4131 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4132 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4133 supports_stopped_by_hw_breakpoint>: New fields.
4134 (target_supports_stopped_by_sw_breakpoint)
4135 (target_stopped_by_sw_breakpoint)
4136 (target_supports_stopped_by_hw_breakpoint)
4137 (target_stopped_by_hw_breakpoint): Declare.
4138
4139 2015-03-04 Pedro Alves <palves@redhat.com>
4140
4141 enum lwp_stop_reason -> enum target_stop_reason
4142 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4143 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4144 (linux_wait_1, stuck_in_jump_pad_callback)
4145 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4146 (linux_stopped_by_watchpoint):
4147 * linux-low.h (enum lwp_stop_reason): Delete.
4148 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4149 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4150
4151 2015-03-04 Yao Qi <yao.qi@linaro.org>
4152
4153 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4154
4155 2015-03-03 Gary Benson <gbenson@redhat.com>
4156
4157 * hostio.c (handle_vFile): Fix prefix lengths.
4158
4159 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4160
4161 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4162 ptr_bits.
4163
4164 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4165
4166 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4167 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4168 (clean): Add "rm -f" for above C files.
4169 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4170 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4171 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4172 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4173 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4174 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4175 (init_registers_s390x_vx_linux64)
4176 (init_registers_s390x_tevx_linux64)
4177 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4178 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4179 declarations.
4180 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4181 (s390_store_vxrs_high): New functions.
4182 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4183 NT_S390_VXRS_HIGH.
4184 (s390_arch_setup): Add logic for selecting one of the new target
4185 descriptions. Activate the new vector regsets if applicable.
4186 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4187 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4188 and init_registers_s390x_tevx_linux64.
4189
4190 2015-03-01 Pedro Alves <palves@redhat.com>
4191
4192 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4193 parameter.
4194
4195 2015-02-27 Pedro Alves <palves@redhat.com>
4196
4197 * linux-x86-low.c (u_debugreg_offset): New function.
4198 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4199
4200 2015-02-27 Pedro Alves <palves@redhat.com>
4201
4202 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4203 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4204 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4205 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4206 (ps_lsetfpregs, ps_getpid)
4207 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4208 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4209 (ps_lsetxregs, ps_plog): Declare.
4210
4211 2015-02-27 Pedro Alves <palves@redhat.com>
4212
4213 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4214 IP_AGENT_EXPORT_FUNC.
4215 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4216 IP_AGENT_EXPORT_FUNC.
4217 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4218 (IP_AGENT_EXPORT): Delete.
4219 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4220 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4221 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4222 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4223 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4224 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4225 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4226 (traceframe_read_count, traceframe_write_count)
4227 (traceframes_created, trace_state_variables, get_raw_reg)
4228 (get_trace_state_variable_value, set_trace_state_variable_value)
4229 (ust_loaded, helper_thread_id, cmd_buf): Use
4230 IPA_SYM_EXPORTED_NAME.
4231 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4232 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4233 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4234 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4235 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4236 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4237 EXTERN_C_PUSH/EXTERN_C_POP.
4238 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4239 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4240 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4241 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4242 (traceframe_write_count, traceframe_read_count)
4243 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4244 (about_to_request_buffer_space, get_trace_state_variable_value)
4245 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4246 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4247 EXTERN_C_PUSH/EXTERN_C_POP.
4248 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4249 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4250 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4251 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4252 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4253 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4254 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4255 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4256 Define.
4257 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4258 (IP_AGENT_EXPORT_VAR_DECL): Define.
4259 (tracing): Declare.
4260 (gdb_agent_get_raw_reg): Declare.
4261
4262 2015-02-27 Tom Tromey <tromey@redhat.com>
4263 Pedro Alves <palves@redhat.com>
4264
4265 Rename symbols whose names are reserved C++ keywords throughout.
4266
4267 2015-02-27 Pedro Alves <palves@redhat.com>
4268
4269 * Makefile.in (COMPILER): New, get it from autoconf.
4270 (CXX): Get from autoconf instead.
4271 (COMPILE.pre): Use COMPILER.
4272 (CC-LD): Rename to ...
4273 (CC_LD): ... this. Use COMPILER.
4274 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4275 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4276 * acinclude.m4: Include build-with-cxx.m4.
4277 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4278 Disable -Werror by default if building in C++ mode.
4279 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4280 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4281 the C++ compiler. Save/restore CXXFLAGS too.
4282 * configure: Regenerate.
4283
4284 2015-02-27 Pedro Alves <palves@redhat.com>
4285
4286 * acinclude.m4: Include libiberty.m4.
4287 * configure.ac: Call libiberty_INIT.
4288 * config.in, configure: Regenerate.
4289
4290 2015-02-26 Pedro Alves <palves@redhat.com>
4291
4292 * linux-low.c (linux_wait_1): When incrementing the PC past a
4293 program breakpoint always use the_low_target.breakpoint_len as
4294 increment, rather than the maximum between that and
4295 the_low_target.decr_pc_after_break.
4296
4297 2015-02-23 Pedro Alves <palves@redhat.com>
4298
4299 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4300 thread was doing a step-over; always adjust the PC if
4301 we stepped over a permanent breakpoint.
4302 (linux_wait_1): If we stepped over breakpoint that was on top of a
4303 permanent breakpoint, manually advance the PC past it.
4304
4305 2015-02-23 Pedro Alves <palves@redhat.com>
4306
4307 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4308 modes.
4309 (x86_fill_gregset, x86_store_gregset): Use it when handling
4310 $orig_eax.
4311
4312 2015-02-20 Pedro Alves <palves@redhat.com>
4313
4314 * thread-db.c: Include "nat/linux-procfs.h".
4315 (thread_db_init): Skip listing new threads if the kernel supports
4316 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4317
4318 2015-02-20 Pedro Alves <palves@redhat.com>
4319
4320 * linux-low.c (status_pending_p_callback): Use ptid_match.
4321
4322 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4323
4324 PR breakpoints/16812
4325 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4326 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4327 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4328
4329 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4330
4331 PR breakpoints/15956
4332 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4333
4334 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4335
4336 * linux-low.c (linux_low_btrace_conf): Print size.
4337 * server.c (handle_btrace_conf_general_set): New.
4338 (hanle_general_set): Call handle_btrace_conf_general_set.
4339 (handle_query): Report Qbtrace-conf:bts:size as supported.
4340
4341 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4342
4343 * linux-low.c (linux_low_enable_btrace): Update parameters.
4344 (linux_low_btrace_conf): New.
4345 (linux_target_ops)<to_btrace_conf>: Initialize.
4346 * server.c (current_btrace_conf): New.
4347 (handle_btrace_enable): Rename to ...
4348 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4349 to target_enable_btrace. Update comment. Update users.
4350 (handle_qxfer_btrace_conf): New.
4351 (qxfer_packets): Add btrace-conf entry.
4352 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4353 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4354 (target_ops)<read_btrace_conf>: New.
4355 (target_enable_btrace): Update parameters.
4356 (target_read_btrace_conf): New.
4357
4358 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4359
4360 * server.c (handle_btrace_general_set): Remove call to
4361 target_supports_btrace.
4362 (supported_btrace_packets): New.
4363 (handle_query): Call supported_btrace_packets.
4364 * target.h: include btrace-common.h.
4365 (btrace_target_info): Removed.
4366 (supports_btrace, target_supports_btrace): Update parameters.
4367
4368 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4369
4370 * Makefile.in (SFILES): Add common/btrace-common.c.
4371 (OBS): Add common/btrace-common.o.
4372 (btrace-common.o): Add build rules.
4373 * linux-low: Include btrace-common.h.
4374 (linux_low_read_btrace): Use struct btrace_data. Call
4375 btrace_data_init and btrace_data_fini.
4376
4377 2015-02-06 Pedro Alves <palves@redhat.com>
4378
4379 * thread-db.c (find_new_threads_callback): Add debug output.
4380
4381 2015-02-04 Pedro Alves <palves@redhat.com>
4382
4383 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4384 (resume_stopped_resumed_lwps): New function.
4385 (linux_wait_for_event_filtered): Use it.
4386
4387 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4388
4389 * Makefile.in (SFILES): Add linux-personality.c.
4390 (linux-personality.o): New rule.
4391 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4392 list of objects to be built.
4393 * linux-low.c: Include nat/linux-personality.h.
4394 (linux_create_inferior): Remove code to disable address space
4395 randomization (moved to ../nat/linux-personality.c). Create
4396 cleanup to disable address space randomization.
4397
4398 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4399
4400 * Makefile.in (posix-strerror.o): New rule.
4401 (mingw-strerror.o): Likewise.
4402 * configure: Regenerated.
4403 * configure.ac: Source file ../common/common.host. Initialize new
4404 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4405
4406 2015-01-14 Yao Qi <yao@codesourcery.com>
4407
4408 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4409 (ppc-linux.o): New rule.
4410 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4411 * configure.ac: AC_CHECK_FUNCS(getauxval).
4412 * config.in: Re-generated.
4413 * configure: Re-generated.
4414 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4415 ppc64_64bit_inferior_p
4416
4417 2015-01-14 Yao Qi <yao@codesourcery.com>
4418
4419 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4420 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4421 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4422 (PT_ORIG_R3, PT_TRAP): Likewise.
4423 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4424 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4425 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4426
4427 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4428
4429 * i387-fp.c (i387_cache_to_xsave): In look over
4430 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4431 zmmh_low_space field by use of zmmh_high_space.
4432
4433 2015-01-09 Pedro Alves <palves@redhat.com>
4434
4435 * linux-low.c (step_over_bkpt): Move higher up in the file.
4436 (handle_extended_wait): Don't store the stop_pc here.
4437 (get_stop_pc): Adjust comments and rename to ...
4438 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4439 stopped for a software breakpoint or hardware breakpoint.
4440 (thread_still_has_status_pending_p): New function.
4441 (status_pending_p_callback): Use
4442 thread_still_has_status_pending_p. If the event is no longer
4443 interesting, resume the LWP.
4444 (handle_tracepoints): Add assert.
4445 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4446 (wstatus_maybe_breakpoint): New function.
4447 (cancel_breakpoint): Delete function.
4448 (check_stopped_by_watchpoint): New function, factored out from
4449 linux_low_filter_event.
4450 (lp_status_maybe_breakpoint): Delete function.
4451 (linux_low_filter_event): Remove filter_ptid argument.
4452 Leave thread group exits pending here. Store the LWP's stop PC.
4453 Always leave events pending.
4454 (linux_wait_for_event_filtered): Pull all events out of the
4455 kernel, and leave them all pending.
4456 (count_events_callback, select_event_lwp_callback): Consider all
4457 events.
4458 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4459 (select_event_lwp): Only give preference to the stepping LWP in
4460 all-stop mode. Adjust comments.
4461 (ignore_event): New function.
4462 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4463 references to cancel_breakpoints. Adjust to renames. Also give
4464 equal priority to all LWPs that have had events in non-stop mode.
4465 If reporting a software breakpoint event, unadjust the LWP's PC.
4466 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4467 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4468 Adjust.
4469 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4470 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4471 (linux_stopped_by_watchpoint): Adjust.
4472 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4473 * linux-low.h (enum lwp_stop_reason): New.
4474 (struct lwp_info) <stop_pc>: Adjust comment.
4475 <stopped_by_watchpoint>: Delete field.
4476 <stop_reason>: New field.
4477 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4478 * mem-break.c (software_breakpoint_inserted_here)
4479 (hardware_breakpoint_inserted_here): New function.
4480 * mem-break.h (software_breakpoint_inserted_here)
4481 (hardware_breakpoint_inserted_here): Declare.
4482 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4483 (cancel_breakpoints): Delete.
4484 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4485 (upload_fast_traceframes): Remove references to
4486 cancel_breakpoints.
4487
4488 2015-01-09 Pedro Alves <palves@redhat.com>
4489
4490 * thread-db.c (find_new_threads_callback): Ignore thread if the
4491 kernel thread ID is -1.
4492
4493 2015-01-09 Pedro Alves <palves@redhat.com>
4494
4495 * linux-low.c (linux_attach_fail_reason_string): Move to
4496 nat/linux-ptrace.c, and rename.
4497 (linux_attach_lwp): Update comment.
4498 (attach_proc_task_lwp_callback): New function.
4499 (linux_attach): Adjust to rename and use
4500 linux_proc_attach_tgid_threads.
4501 (linux_attach_fail_reason_string): Delete declaration.
4502
4503 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4504
4505 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4506 * server.c (gdbserver_version): Likewise.
4507
4508 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4509
4510 * remote-utils.c: Include ctype.h.
4511 (input_interrupt): Explicitly handle the case when the char
4512 received is the NUL byte. Improve the printing of non-ASCII
4513 characters.
4514
4515 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4516
4517 * linux-low.c (linux_low_filter_event): Update call to
4518 linux_enable_event_reporting following the addition of
4519 a new parameter to that function.
4520
4521 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4522
4523 PR server/17457
4524 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4525 (AARCH64_FPCR_REGNO): Likewise.
4526 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4527 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4528 (aarch64_store_fpregset): Likewise.
4529
4530 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4531
4532 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4533 Remove FIXME comment about assumption about N.
4534
4535 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4536
4537 * configure.ac: If large-file support is disabled in GDBserver,
4538 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4539 * configure: Regenerate.
4540
4541 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4542
4543 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4544 warning upon ENODATA from ptrace.
4545 * linux-s390-low.c (s390_store_tdb): New.
4546 (s390_regsets): Add regset for NT_S390_TDB.
4547
4548 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4549
4550 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4551 without a fill_function.
4552 * linux-s390-low.c (s390_fill_last_break): Remove.
4553 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4554 (s390_arch_setup): Use regset's size instead of fill_function for
4555 loop end condition.
4556
4557 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4558
4559 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4560 the regset's store function when ptrace returned an error.
4561 * regcache.c (get_thread_regcache): Invalidate register cache
4562 before fetching inferior's registers.
4563
4564 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4565
4566 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4567 while-loop as for-loop.
4568 (regsets_store_inferior_registers): Likewise.
4569
4570 2014-11-28 Yao Qi <yao@codesourcery.com>
4571
4572 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4573 * config.in, configure: Re-generate.
4574 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4575 is defined.
4576
4577 2014-11-21 Yao Qi <yao@codesourcery.com>
4578
4579 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4580 (AC_CHECK_HEADERS): Remove malloc.h.
4581 * configure: Re-generated.
4582 * config.in: Re-generated.
4583 * server.h: Don't include alloca.h and malloc.h.
4584 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4585 Don't include malloc.h.
4586
4587 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4588
4589 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4590 corresponding ERRNO check in same block.
4591
4592 2014-11-12 Pedro Alves <palves@redhat.com>
4593
4594 * server.c (cont_thread): Update comment.
4595 (start_inferior, attach_inferior): No longer clear cont_thread.
4596 (handle_v_cont): No longer set cont_thread.
4597 (captured_main): Clear cont_thread each time a GDB connects.
4598
4599 2014-11-12 Pedro Alves <palves@redhat.com>
4600
4601 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4602 thread, and don't resume all threads if the Hc thread has exited.
4603
4604 2014-11-12 Pedro Alves <palves@redhat.com>
4605
4606 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4607 the process group instead of to a specific LWP.
4608
4609 2014-10-15 Pedro Alves <palves@redhat.com>
4610
4611 PR server/17487
4612 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4613 parameter.
4614 (arm_set_thread_context): Delete.
4615 (the_low_target): Adjust.
4616 * win32-i386-low.c (debug_registers_changed)
4617 (debug_registers_used): Delete.
4618 (update_debug_registers_callback): New function.
4619 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4620 needing to update their debug registers.
4621 (win32_get_current_dr): New function.
4622 (x86_dr_low_get_addr, x86_dr_low_get_control)
4623 (x86_dr_low_get_status): Fetch the debug register from the thread
4624 record's context.
4625 (i386_initial_stuff): Adjust.
4626 (i386_get_thread_context): Remove current_event parameter. Don't
4627 clear debug_registers_changed nor copy DR values to
4628 debug_reg_state.
4629 (i386_set_thread_context): Delete.
4630 (i386_prepare_to_resume): New function.
4631 (i386_thread_added): Mark the thread as needing to update irs
4632 debug registers.
4633 (the_low_target): Remove i386_set_thread_context and install
4634 i386_prepare_to_resume.
4635 * win32-low.c (win32_get_thread_context): Adjust.
4636 (win32_set_thread_context): Use SetThreadContext
4637 directly.
4638 (win32_prepare_to_resume): New function.
4639 (win32_require_context): New function, factored out from ...
4640 (thread_rec): ... this.
4641 (continue_one_thread): Call win32_prepare_to_resume on each thread
4642 we're about to continue.
4643 (win32_resume): Call win32_prepare_to_resume on the event thread.
4644 * win32-low.h (struct win32_thread_info)
4645 <debug_registers_changed>: New field.
4646 (struct win32_target_ops): Change prototype of set_thread_context,
4647 delete set_thread_context and add prepare_to_resume.
4648 (win32_require_context): New declaration.
4649
4650 2014-10-08 Gary Benson <gbenson@redhat.com>
4651
4652 * server.h: Do not include common-exceptions.h.
4653
4654 2014-10-08 Gary Benson <gbenson@redhat.com>
4655
4656 * server.h: Do not include cleanups.h.
4657
4658 2014-09-30 James Hogan <james.hogan@imgtec.com>
4659
4660 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4661 mips64-dsp-linux.c.
4662
4663 2014-09-23 Yao Qi <yao@codesourcery.com>
4664
4665 * linux-low.c (lp_status_maybe_breakpoint): New function.
4666 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4667 (count_events_callback): Likewise.
4668 (select_event_lwp_callback): Likewise.
4669 (cancel_breakpoints_callback): Likewise.
4670
4671 2014-09-19 Don Breazeal <donb@codesourcery.com>
4672
4673 * linux-low.c (handle_extended_wait): Call
4674 linux_ptrace_get_extended_event.
4675 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4676 linux_is_extended_waitstatus.
4677
4678 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4679
4680 * Makefile.in (CPPFLAGS): Define.
4681 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4682 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4683
4684 2014-09-16 Gary Benson <gbenson@redhat.com>
4685
4686 * inferiors.h (current_inferior): Renamed as...
4687 (current_thread): New variable. All uses updated.
4688 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4689 (maybe_move_out_of_jump_pad): Likewise.
4690 (cancel_breakpoint): Likewise.
4691 (linux_low_filter_event): Likewise.
4692 (wait_for_sigstop): Likewise.
4693 (linux_resume_one_lwp): Likewise.
4694 (need_step_over_p): Likewise.
4695 (start_step_over): Likewise.
4696 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4697 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4698 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4699 and save_inferior as saved_thread.
4700 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4701 saved_thread.
4702 (regcache_invalidate_thread): Likewise.
4703 * remote-utils.c (prepare_resume_reply): Likewise.
4704 * thread-db.c (thread_db_get_tls_address): Likewise.
4705 (disable_thread_event_reporting): Likewise.
4706 (remove_thread_event_breakpoints): Likewise.
4707 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4708 as saved_thread.
4709 * target.h (set_desired_inferior): Renamed as...
4710 (set_desired_thread): New declaration. All uses updated.
4711 * server.c (myresume): Updated comment to reference thread instead
4712 of inferior.
4713 (handle_serial_event): Likewise.
4714 (handle_target_event): Likewise.
4715
4716 2014-09-12 Tom Tromey <tromey@redhat.com>
4717 Gary Benson <gbenson@redhat.com>
4718
4719 * regcache.h: Include common-regcache.h.
4720 (regcache_read_pc): Don't declare.
4721 * regcache.c (get_thread_regcache_for_ptid): New function.
4722
4723 2014-09-11 Tom Tromey <tromey@redhat.com>
4724 Gary Benson <gbenson@redhat.com>
4725
4726 * symbol.c: New file.
4727 * Makefile.in (SFILES): Add symbol.c.
4728 (OBS): Add symbol.o.
4729
4730 2014-09-11 Gary Benson <gbenson@redhat.com>
4731
4732 * target.c (target_stop_ptid, target_continue_ptid): New
4733 functions.
4734
4735 2014-09-11 Tom Tromey <tromey@redhat.com>
4736 Gary Benson <gbenson@redhat.com>
4737
4738 * target.h: Include target/target.h.
4739 * target.c (target_read_memory, target_read_uint32)
4740 (target_write_memory): New functions.
4741
4742 2014-09-11 Gary Benson <gbenson@redhat.com>
4743
4744 * server.h (debug_hw_points): Don't declare.
4745 * server.c (debug_hw_points): Don't define. Replace all uses
4746 with show_debug_regs.
4747 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4748 all uses with show_debug_regs.
4749
4750 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4751
4752 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4753 endianness into account.
4754 (ppc_supply_ptrace_register): Likewise.
4755
4756 2014-09-03 James Hogan <james.hogan@imgtec.com>
4757
4758 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4759 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4760
4761 2014-09-03 Gary Benson <gbenson@redhat.com>
4762
4763 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4764 ALL_DEBUG_ADDRESS_REGISTERS.
4765
4766 2014-09-02 Gary Benson <gbenson@redhat.com>
4767
4768 * i386-low.h: Renamed as...
4769 * x86-low.h: New file. All type, function and variable name
4770 prefixes changed from "i386_" to "x86_". All references updated.
4771 * i386-low.c: Renamed as...
4772 * x86-low.c: New file. All type, function and variable name
4773 prefixes changed from "i386_" to "x86_". All references updated.
4774
4775 2014-09-02 Gary Benson <gbenson@redhat.com>
4776
4777 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4778 (x86_linux_new_thread): Likewise.
4779
4780 2014-08-29 Gary Benson <gbenson@redhat.com>
4781
4782 * server.h (setjmp.h): Do not include.
4783 (toplevel): Do not declare.
4784 (common-exceptions.h): Include.
4785 (cleanups.h): Likewise.
4786 * server.c (toplevel): Do not define.
4787 (exit_code): New static global.
4788 (detach_or_kill_for_exit_cleanup): New function.
4789 (main): New function. Original main renamed to...
4790 (captured_main): New function.
4791 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4792
4793 2014-08-29 Gary Benson <gbenson@redhat.com>
4794
4795 * Makefile.in (SFILES): Add common/common-exceptions.c.
4796 (OBS): Add common-exceptions.o.
4797 (common-exceptions.o): New rule.
4798 * utils.c (prepare_to_throw_exception): New function.
4799
4800 2014-08-29 Gary Benson <gbenson@redhat.com>
4801
4802 * config.in: Regenerate.
4803 * configure: Likewise.
4804
4805 2014-08-29 Gary Benson <gbenson@redhat.com>
4806
4807 * Makefile.in (SFILES): Add common/cleanups.c.
4808 (OBS): cleanups.o.
4809 (cleanups.o): New rule.
4810
4811 2014-08-29 Gary Benson <gbenson@redhat.com>
4812
4813 * utils.c (internal_vwarning): New function.
4814
4815 2014-08-28 Gary Benson <gbenson@redhat.com>
4816
4817 * utils.h (fatal): Remove declaration.
4818 * utils.c (fatal): Remove function.
4819
4820 2014-08-28 Gary Benson <gbenson@redhat.com>
4821
4822 * tracepoint.c (gdb_agent_init): Replace fatal with
4823 perror_with_name.
4824 (initialize_tracepoint): Likewise.
4825
4826 2014-08-28 Gary Benson <gbenson@redhat.com>
4827
4828 * remote-utils.c (remote_prepare): Replace fatal with error.
4829
4830 2014-08-28 Gary Benson <gbenson@redhat.com>
4831
4832 * linux-low.c (linux_async): Replace fatal with warning.
4833 Tidy up and return.
4834 (linux_start_non_stop): Return -1 if linux_async failed.
4835
4836 2014-08-28 Gary Benson <gbenson@redhat.com>
4837
4838 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4839 gdb_assert.
4840 (i386_dr_low_get_addr): Remove vague comment.
4841 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4842 gdb_assert.
4843
4844 2014-08-28 Gary Benson <gbenson@redhat.com>
4845
4846 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4847 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4848 internal_error.
4849 (linux_resume_one_lwp): Likewise.
4850 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4851 gdb_assert.
4852 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4853 with internal_error.
4854 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4855 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4856 (find_register_by_name): Replace fatal with internal_error.
4857 (find_regno): Likewise.
4858 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4859 * thread-db.c (thread_db_create_event): Likewise.
4860 (thread_db_load_search): Likewise.
4861 (try_thread_db_load_1): Likewise.
4862 * tracepoint.c (get_jump_space_head): Replace fatal with
4863 internal_error.
4864 (claim_trampoline_space): Likewise.
4865 (have_fast_tracepoint_trampoline_buffer): Likewise.
4866 (cmd_qtstart): Likewise.
4867 (stop_tracing): Likewise.
4868 (fast_tracepoint_collecting): Likewise.
4869 (target_malloc): Likewise.
4870 (download_tracepoint): Likewise.
4871 (download_trace_state_variables): Replace check with gdb_assert.
4872 (upload_fast_traceframes): Replace fatal with internal_error.
4873
4874 2014-08-19 Tom Tromey <tromey@redhat.com>
4875 Gary Benson <gbenson@redhat.com>
4876
4877 * Makefile.in (SFILES): Add common/common-debug.c.
4878 (OBS): Add common-debug.o.
4879 (common-debug.o): New rule.
4880 * debug.h (debug_printf): Don't declare.
4881 * debug.c (debug_printf): Renamed and rewritten as...
4882 (debug_vprintf): New function.
4883
4884 2014-08-19 Gary Benson <gbenson@redhat.com>
4885
4886 * utils.h: Do not include print-utils.h.
4887
4888 2014-08-19 Tom Tromey <tromey@redhat.com>
4889 Gary Benson <gbenson@redhat.com>
4890
4891 * server.h: Add static assertion.
4892 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4893
4894 2014-08-19 Tom Tromey <tromey@redhat.com>
4895 Gary Benson <gbenson@redhat.com>
4896
4897 * Makefile.in (SFILES): Add common/errors.c.
4898 (OBS): Add errors.o.
4899 (IPA_OBS): Add errors-ipa.o.
4900 (errors.o): New rule.
4901 (errors-ipa.o): Likewise.
4902 * utils.h (perror_with_name, error, warning): Don't declare.
4903 * utils.c (warning): Renamed and rewritten as...
4904 (vwarning): New function.
4905 (error): Renamed and rewritten as...
4906 (verror): New function.
4907 (internal_error): Renamed and rewritten as...
4908 (internal_verror): New function.
4909
4910 2014-08-07 Gary Benson <gbenson@redhat.com>
4911
4912 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4913 * configure: Regenerate.
4914 * config.in: Likewise.
4915 * server.h: Do not include errno.h.
4916 * event-loop.c: Likewise.
4917 * hostio-errno.c: Likewise.
4918 * linux-low.c: Likewise.
4919 * remote-utils.c: Likewise.
4920 * spu-low.c: Likewise.
4921 * utils.c: Likewise.
4922 * gdbreplay.c: Unconditionally include errno.h.
4923
4924 2014-08-07 Gary Benson <gbenson@redhat.com>
4925
4926 * server.h: Do not include string.h.
4927 * event-loop.c: Likewise.
4928 * linux-low.c: Likewise.
4929 * regcache.c: Likewise.
4930 * remote-utils.c: Likewise.
4931 * spu-low.c: Likewise.
4932 * utils.c: Likewise.
4933
4934 2014-08-07 Gary Benson <gbenson@redhat.com>
4935
4936 * server.h: Do not include gdb_assert.h.
4937
4938 2014-08-07 Gary Benson <gbenson@redhat.com>
4939
4940 * server.h: Do not include common-utils.h.
4941
4942 2014-08-07 Gary Benson <gbenson@redhat.com>
4943
4944 * server.h: Do not include ptid.h.
4945 * notif.h: Likewise.
4946
4947 2014-08-07 Gary Benson <gbenson@redhat.com>
4948
4949 * server.h: Do not include gdb_locale.h.
4950
4951 2014-08-07 Gary Benson <gbenson@redhat.com>
4952
4953 * server.h: Do not include gdb/signals.h.
4954 * win32-low.c: Likewise.
4955
4956 2014-08-07 Gary Benson <gbenson@redhat.com>
4957
4958 * server.h: Do not include pathmax.h.
4959
4960 2014-08-07 Gary Benson <gbenson@redhat.com>
4961
4962 * server.h: Do not include libiberty.h.
4963 * linux-bfin-low.c: Likewise.
4964
4965 2014-08-07 Gary Benson <gbenson@redhat.com>
4966
4967 * server.h: Do not include ansidecl.h.
4968
4969 2014-08-07 Gary Benson <gbenson@redhat.com>
4970
4971 * linux-x86-low.c: Do not include stddef.h.
4972 * lynx-ppc-low.c: Likewise.
4973 * tracepoint.c: Likewise.
4974
4975 2014-08-07 Gary Benson <gbenson@redhat.com>
4976
4977 * server.h: Do not include stdarg.h.
4978 * nto-low.c: Likewise.
4979
4980 2014-08-07 Gary Benson <gbenson@redhat.com>
4981
4982 * server.h: Do not include stdlib.h.
4983 * inferiors.c: Likewise.
4984 * linux-low.c: Likewise.
4985 * regcache.c: Likewise.
4986 * spu-low.c: Likewise.
4987 * tracepoint.c: Likewise.
4988 * utils.c: Likewise.
4989
4990 2014-08-07 Gary Benson <gbenson@redhat.com>
4991
4992 * server.h: Do not include stdio.h.
4993 * linux-low.c: Likewise.
4994 * remote-utils.c: Likewise.
4995 * spu-low.c: Likewise.
4996 * utils.c: Likewise.
4997 * wincecompat.c: Likewise.
4998
4999 2014-08-06 Gary Benson <gbenson@redhat.com>
5000
5001 * regcache.c (init_register_cache): Move conditionals inside if.
5002
5003 2014-08-06 Gary Benson <gbenson@redhat.com>
5004
5005 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5006
5007 2014-07-31 Gary Benson <gbenson@redhat.com>
5008
5009 * ax.h: Do not include server.h.
5010 * gdbthread.h: Likewise.
5011 * lynx-low.h: Likewise.
5012 * notif.h: Likewise.
5013
5014 2014-07-30 Gary Benson <gbenson@redhat.com>
5015
5016 * server.h: Include common-defs.h.
5017 Do not include config.h or build-gnulib-gdbserver/config.h.
5018
5019 2014-07-30 Gary Benson <gbenson@redhat.com>
5020
5021 * hostio-errno.c: Move server.h to top of includes list.
5022 * inferiors.c: Likewise.
5023 * linux-x86-low.c: Likewise.
5024 * notif.c: Include server.h.
5025
5026 2014-07-24 Tom Tromey <tromey@redhat.com>
5027 Gary Benson <gbenson@redhat.com>
5028
5029 * server.h (CORE_ADDR): Now unsigned.
5030
5031 2014-07-16 Pedro Alves <palves@redhat.com>
5032
5033 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5034
5035 2014-07-15 Pedro Alves <palves@redhat.com>
5036
5037 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5038 copy.
5039
5040 2014-07-11 Pedro Alves <palves@redhat.com>
5041
5042 * linux-low.c (kill_wait_lwp): New function, based on
5043 kill_one_lwp_callback, but use my_waitpid directly.
5044 (kill_one_lwp_callback, linux_kill): Use it.
5045
5046 2014-06-23 Pedro Alves <palves@redhat.com>
5047
5048 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5049 before setting DR0..DR3.
5050
5051 2014-06-20 Gary Benson <gbenson@redhat.com>
5052
5053 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5054 * configure: Regenerated.
5055 * config.in: Likewise.
5056
5057 2014-06-20 Gary Benson <gbenson@redhat.com>
5058
5059 * Makefile.in (SFILES): Update locations for files moved
5060 from common to nat.
5061 (object file files): Reordered.
5062
5063 2014-06-20 Gary Benson <gbenson@redhat.com>
5064
5065 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5066 (i386_dr_low_set_addr): Likewise.
5067 (i386_dr_low_get_addr): Likewise.
5068 (i386_dr_low_can_set_control): Likewise.
5069 (i386_dr_low_set_control): Likewise.
5070 (i386_dr_low_get_control): Likewise.
5071 (i386_dr_low_get_status): Likewise.
5072 (i386_get_debug_register_length): Likewise.
5073 * linux-x86-low.c (i386_dr_low_set_addr):
5074 Changed signature. Made static.
5075 (i386_dr_low_get_addr): Likewise.
5076 (i386_dr_low_set_control): Likewise.
5077 (i386_dr_low_get_control): Likewise.
5078 (i386_dr_low_get_status): Likewise.
5079 (i386_dr_low): New global variable.
5080 * win32-i386-low.c (i386_dr_low_set_addr):
5081 Changed signature. Made static.
5082 (i386_dr_low_get_addr): Likewise.
5083 (i386_dr_low_set_control): Likewise.
5084 (i386_dr_low_get_control): Likewise.
5085 (i386_dr_low_get_status): Likewise.
5086 (i386_dr_low): New global variable.
5087
5088 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5089
5090 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5091 * Makefile.in (AR, AR_FLAGS): Define.
5092 * configure: Regenerate.
5093
5094 2014-06-19 Gary Benson <gbenson@redhat.com>
5095
5096 * Makefile.in (i386-dregs.o): New rule.
5097 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5098 * i386-low.c (target.h): Remove include.
5099 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5100 (DR_CONTROL_SHIFT): Likewise.
5101 (DR_CONTROL_SIZE): Likewise.
5102 (DR_RW_EXECUTE): Likewise.
5103 (DR_RW_WRITE): Likewise.
5104 (DR_RW_READ): Likewise.
5105 (DR_RW_IORW): Likewise.
5106 (DR_LEN_1): Likewise.
5107 (DR_LEN_2): Likewise.
5108 (DR_LEN_4): Likewise.
5109 (DR_LEN_8): Likewise.
5110 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5111 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5112 (DR_ENABLE_SIZE): Likewise.
5113 (DR_LOCAL_SLOWDOWN): Likewise.
5114 (DR_GLOBAL_SLOWDOWN): Likewise.
5115 (DR_CONTROL_RESERVED): Likewise.
5116 (I386_DR_CONTROL_MASK): Likewise.
5117 (I386_DR_VACANT): Likewise.
5118 (I386_DR_LOCAL_ENABLE): Likewise.
5119 (I386_DR_GLOBAL_ENABLE): Likewise.
5120 (I386_DR_DISABLE): Likewise.
5121 (I386_DR_SET_RW_LEN): Likewise.
5122 (I386_DR_GET_RW_LEN): Likewise.
5123 (I386_DR_WATCH_HIT): Likewise.
5124 (i386_wp_op_t): Likewise.
5125 (i386_show_dr): Likewise.
5126 (i386_length_and_rw_bits): Likewise.
5127 (i386_insert_aligned_watchpoint): Likewise.
5128 (i386_remove_aligned_watchpoint): Likewise.
5129 (i386_handle_nonaligned_watchpoint): Likewise.
5130 i386_update_inferior_debug_regs(): Likewise.
5131 (i386_dr_insert_watchpoint): Likewise.
5132 (i386_dr_remove_watchpoint): Likewise.
5133 (i386_dr_region_ok_for_watchpoint): Likewise.
5134 (i386_dr_stopped_data_address): Likewise.
5135 (i386_dr_stopped_by_watchpoint): Likewise.
5136
5137 2014-06-19 Gary Benson <gbenson@redhat.com>
5138
5139 * i386-low.c (i386_dr_show): Renamed to
5140 i386_show_dr and made static. All uses updated.
5141 (i386_dr_length_and_rw_bits): Renamed to
5142 i386_length_and_rw_bits and made static.
5143 All uses updated.
5144 (i386_dr_insert_aligned_watchpoint): Renamed to
5145 i386_insert_aligned_watchpoint and made static.
5146 All uses updated.
5147 (i386_dr_remove_aligned_watchpoint): Renamed to
5148 i386_remove_aligned_watchpoint and made static.
5149 All uses updated.
5150 (i386_dr_update_inferior_debug_regs): Renamed to
5151 i386_update_inferior_debug_regs and made static.
5152 All uses updated.
5153
5154 2014-06-18 Gary Benson <gbenson@redhat.com>
5155
5156 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5157 (i386_dr_low_can_set_control): Likewise.
5158 (i386_get_debug_register_length): Likewise.
5159 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5160 (i386_dr_low_can_set_control): Likewise.
5161 (i386_get_debug_register_length): Likewise.
5162
5163 2014-06-17 Gary Benson <gbenson@redhat.com>
5164
5165 * i386-low.h (i386-dregs.h): New include.
5166 (DR_FIRSTADDR): Now in i386-dregs.h.
5167 (DR_LASTADDR): Likewise.
5168 (DR_NADDR): Likewise.
5169 (DR_STATUS): Likewise.
5170 (DR_CONTROL): Likewise.
5171 (i386_debug_reg_state): Likewise.
5172 (i386_dr_insert_watchpoint): Likewise.
5173 (i386_dr_remove_watchpoint): Likewise.
5174 (i386_dr_region_ok_for_watchpoint): Likewise.
5175 (i386_dr_stopped_data_address): Likewise.
5176 (i386_dr_stopped_by_watchpoint): Likewise.
5177 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5178
5179 2014-06-18 Gary Benson <gbenson@redhat.com>
5180
5181 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5182 i386_dr_insert_watchpoint.
5183 (i386_low_remove_watchpoint): Renamed to
5184 i386_dr_remove_watchpoint.
5185 (i386_low_region_ok_for_watchpoint): Renamed to
5186 i386_dr_region_ok_for_watchpoint.
5187 (i386_low_stopped_data_address): Renamed to
5188 i386_dr_stopped_data_address.
5189 (i386_low_stopped_by_watchpoint): Renamed to
5190 i386_dr_stopped_by_watchpoint.
5191 * i386-low.c (i386_show_dr): Renamed to
5192 i386_dr_show and made nonstatic. All uses updated.
5193 (i386_length_and_rw_bits): Renamed to
5194 i386_dr_length_and_rw_bits and made nonstatic.
5195 All uses updated.
5196 (i386_insert_aligned_watchpoint): Renamed to
5197 i386_dr_insert_aligned_watchpoint and made nonstatic.
5198 All uses updated.
5199 (i386_remove_aligned_watchpoint): Renamed to
5200 i386_dr_remove_aligned_watchpoint and made nonstatic.
5201 All uses updated.
5202 (i386_update_inferior_debug_regs): Renamed to
5203 i386_dr_update_inferior_debug_regs and made nonstatic.
5204 All uses updated.
5205 (i386_low_insert_watchpoint): Renamed to
5206 i386_dr_insert_watchpoint. All uses updated.
5207 (i386_low_remove_watchpoint): Renamed to
5208 i386_dr_remove_watchpoint. All uses updated.
5209 (i386_low_region_ok_for_watchpoint): Renamed to
5210 i386_dr_region_ok_for_watchpoint. All uses updated.
5211 (i386_low_stopped_data_address): Renamed to
5212 i386_dr_stopped_data_address. All uses updated.
5213 (i386_low_stopped_by_watchpoint): Renamed to
5214 i386_dr_stopped_by_watchpoint. All uses updated.
5215
5216 2014-06-18 Gary Benson <gbenson@redhat.com>
5217
5218 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5219 (i386_dr_low_can_set_control): Likewise.
5220 (i386_insert_aligned_watchpoint): New check.
5221
5222 2014-06-18 Gary Benson <gbenson@redhat.com>
5223
5224 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5225 Renamed to state.
5226
5227 2014-06-18 Gary Benson <gbenson@redhat.com>
5228
5229 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5230 instead of fatal and error.
5231 (i386_handle_nonaligned_watchpoint): Likewise.
5232
5233 2014-06-18 Gary Benson <gbenson@redhat.com>
5234
5235 * i386-low.c (i386_get_debug_register_length): New macro.
5236 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5237 (i386_show_dr): Use debug_printf instead of fprintf. Use
5238 phex to format values.
5239
5240 2014-06-18 Gary Benson <gbenson@redhat.com>
5241
5242 * i386-low.h: Comment changes.
5243 * i386-low.c: Likewise.
5244
5245 2014-06-18 Gary Benson <gbenson@redhat.com>
5246
5247 * i386-low.c: Whitespace changes.
5248
5249 2014-06-12 Tom Tromey <tromey@redhat.com>
5250
5251 * utils.c (freeargv): Remove.
5252
5253 2014-06-12 Tom Tromey <tromey@redhat.com>
5254
5255 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5256 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5257 (parse_debug_format_options): Likewise.
5258 (gdbserver_usage): Likewise.
5259 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5260 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5261 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5262 against libiberty.
5263 ($(LIBGNU)): Depend on libiberty.
5264 (all-lib): Recurse into all subdirs.
5265 (install-only): Invoke "install" target in subdirs.
5266 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5267 targets.
5268 * configure: Rebuild.
5269 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5270 for vasprintf, vsnprintf, or gettimeofday.
5271 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5272 srv_tgtobj.
5273
5274 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5275
5276 * development.sh: Delete.
5277 * Makefile.in (config.status): Adjust dependency on development.sh.
5278 * configure.ac: Adjust development.sh source call.
5279 * configure: Regenerate.
5280
5281 2014-06-02 Pedro Alves <palves@redhat.com>
5282
5283 * ax.c (gdb_free_agent_expr): New function.
5284 * ax.h (gdb_free_agent_expr): New declaration.
5285 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5286 list.
5287 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5288 static.
5289 (clear_breakpoint_conditions_and_commands): New function.
5290 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5291 (clear_breakpoint_conditions_and_commands): New declaration.
5292
5293 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5294
5295 * linux-aarch64-low.c (asm/ptrace.h): Include.
5296
5297 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5298
5299 Fix TLS access for -static -pthread.
5300 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5301 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5302 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5303
5304 2014-05-20 Pedro Alves <palves@redhat.com>
5305
5306 * linux-aarch64-low.c (aarch64_insert_point)
5307 (aarch64_remove_point): No longer check whether the type is
5308 supported here. Adjust to new interface.
5309 (the_low_target): Install aarch64_supports_z_point_type as
5310 supports_z_point_type method.
5311 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5312 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5313 instead of a Z packet char. Adjust.
5314 (arm_supports_z_point_type): New function.
5315 (arm_insert_point, arm_remove_point): Adjust to new interface.
5316 (the_low_target): Install arm_supports_z_point_type.
5317 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5318 (cris_insert_point, cris_remove_point): Adjust to new interface.
5319 Don't check whether the type is supported here.
5320 (the_low_target): Install cris_supports_z_point_type.
5321 * linux-low.c (linux_supports_z_point_type): New function.
5322 (linux_insert_point, linux_remove_point): Adjust to new interface.
5323 * linux-low.h (struct linux_target_ops) <insert_point,
5324 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5325 raw_breakpoint pointer parameter.
5326 <supports_z_point_type>: New method.
5327 * linux-mips-low.c (mips_supports_z_point_type): New function.
5328 (mips_insert_point, mips_remove_point): Adjust to new interface.
5329 Use mips_supports_z_point_type.
5330 (the_low_target): Install mips_supports_z_point_type.
5331 * linux-ppc-low.c (the_low_target): Install NULL as
5332 supports_z_point_type method.
5333 * linux-s390-low.c (the_low_target): Install NULL as
5334 supports_z_point_type method.
5335 * linux-sparc-low.c (the_low_target): Install NULL as
5336 supports_z_point_type method.
5337 * linux-x86-low.c (x86_supports_z_point_type): New function.
5338 (x86_insert_point): Adjust to new insert_point interface. Use
5339 insert_memory_breakpoint. Adjust to new
5340 i386_low_insert_watchpoint interface.
5341 (x86_remove_point): Adjust to remove_point interface. Use
5342 remove_memory_breakpoint. Adjust to new
5343 i386_low_remove_watchpoint interface.
5344 (the_low_target): Install x86_supports_z_point_type.
5345 * lynx-low.c (lynx_target_ops): Install NULL as
5346 supports_z_point_type callback.
5347 * nto-low.c (nto_supports_z_point_type): New.
5348 (nto_insert_point, nto_remove_point): Adjust to new interface.
5349 (nto_target_ops): Install nto_supports_z_point_type.
5350 * mem-break.c: Adjust intro comment.
5351 (struct raw_breakpoint) <raw_type, size>: New fields.
5352 <inserted>: Update comment.
5353 <shlib_disabled>: Delete field.
5354 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5355 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5356 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5357 (raw_bkpt_type_to_target_hw_bp_type): New function.
5358 (find_enabled_raw_code_breakpoint_at): New function.
5359 (find_raw_breakpoint_at): New type and size parameters. Use them.
5360 (insert_memory_breakpoint): New function, based off
5361 set_raw_breakpoint_at.
5362 (remove_memory_breakpoint): New function.
5363 (set_raw_breakpoint_at): Reimplement.
5364 (set_breakpoint): New, based on set_breakpoint_at.
5365 (set_breakpoint_at): Reimplement.
5366 (delete_raw_breakpoint): Go through the_target->remove_point
5367 instead of assuming memory breakpoints.
5368 (find_gdb_breakpoint_at): Delete.
5369 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5370 (find_gdb_breakpoint): New function.
5371 (set_gdb_breakpoint_at): Delete.
5372 (z_type_supported): New function.
5373 (set_gdb_breakpoint_1): New function, loosely based off
5374 set_gdb_breakpoint_at.
5375 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5376 (delete_gdb_breakpoint_at): Delete.
5377 (delete_gdb_breakpoint_1): New function, loosely based off
5378 delete_gdb_breakpoint_at.
5379 (delete_gdb_breakpoint): New function.
5380 (clear_gdb_breakpoint_conditions): Rename to ...
5381 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5382 breakpoint.
5383 (add_condition_to_breakpoint): Make static.
5384 (add_breakpoint_condition): Take a struct breakpoint pointer
5385 instead of an address. Adjust.
5386 (gdb_condition_true_at_breakpoint): Rename to ...
5387 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5388 z_type parameter.
5389 (gdb_condition_true_at_breakpoint): Reimplement.
5390 (add_breakpoint_commands): Take a struct breakpoint pointer
5391 instead of an address. Adjust.
5392 (gdb_no_commands_at_breakpoint): Rename to ...
5393 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5394 parameter. Return true if no breakpoint was found. Change debug
5395 output.
5396 (gdb_no_commands_at_breakpoint): Reimplement.
5397 (run_breakpoint_commands): Rename to ...
5398 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5399 and change return type to boolean.
5400 (run_breakpoint_commands): New function.
5401 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5402 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5403 breakpoint. Go through the_target->remove_point instead of
5404 assuming memory breakpoint.
5405 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5406 software and hardware breakpoints.
5407 (reinsert_raw_breakpoint): Go through the_target->insert_point
5408 instead of assuming memory breakpoint.
5409 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5410 software and hardware breakpoints.
5411 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5412 Check both software and hardware breakpoints.
5413 (validate_inserted_breakpoint): Assert the breakpoint is a
5414 software breakpoint. Set the inserted flag to -1 instead of
5415 setting shlib_disabled.
5416 (delete_disabled_breakpoints): Adjust.
5417 (validate_breakpoints): Only validate software breakpoints.
5418 Adjust to inserted flag change.
5419 (check_mem_read, check_mem_write): Skip breakpoint types other
5420 than software breakpoints. Adjust to inserted flag change.
5421 * mem-break.h (enum raw_bkpt_type): New enum.
5422 (raw_breakpoint, struct process_info): Forward declare.
5423 (Z_packet_to_target_hw_bp_type): Delete declaration.
5424 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5425 (set_gdb_breakpoint, delete_gdb_breakpoint)
5426 (clear_breakpoint_conditions): New declarations.
5427 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5428 (breakpoint_inserted_here): Update comment.
5429 (add_breakpoint_condition, add_breakpoint_commands): Replace
5430 address parameter with a breakpoint pointer parameter.
5431 (gdb_breakpoint_here): Update comment.
5432 (delete_gdb_breakpoint_at): Delete.
5433 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5434 * server.c (process_point_options): Take a struct breakpoint
5435 pointer instead of an address. Adjust.
5436 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5437 delete_gdb_breakpoint.
5438 * spu-low.c (spu_target_ops): Install NULL as
5439 supports_z_point_type method.
5440 * target.h: Include mem-break.h.
5441 (struct target_ops) <prepare_to_access_memory>: Update comment.
5442 <supports_z_point_type>: New field.
5443 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5444 instead of a char. Also take a raw breakpoint pointer.
5445 * win32-arm-low.c (the_low_target): Install NULL as
5446 supports_z_point_type.
5447 * win32-i386-low.c (i386_supports_z_point_type): New function.
5448 (i386_insert_point, i386_remove_point): Adjust to new interface.
5449 (the_low_target): Install i386_supports_z_point_type.
5450 * win32-low.c (win32_supports_z_point_type): New function.
5451 (win32_insert_point, win32_remove_point): Adjust to new interface.
5452 (win32_target_ops): Install win32_supports_z_point_type.
5453 * win32-low.h (struct win32_target_ops):
5454 <supports_z_point_type>: New method.
5455 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5456 instead of a char. Also take a raw breakpoint pointer.
5457
5458 2014-05-20 Pedro Alves <palves@redhat.com>
5459
5460 * mem-break.h: Include break-common.h.
5461 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5462 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5463 (Z_packet_to_target_hw_bp_type): New declaration.
5464 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5465 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5466 (Z_PACKET_ACCESS_WP): Delete macros.
5467 (Z_packet_to_hw_type): Delete function.
5468 * i386-low.h: Don't include break-common.h here.
5469 (Z_packet_to_hw_type): Delete declaration.
5470 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5471 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5472 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5473 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5474 * linux-aarch64-low.c: Don't include break-common.h here.
5475 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5476 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5477 (Z_packet_to_target_hw_bp_type): Delete function.
5478 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5479 function.
5480 (mips_insert_point, mips_remove_point): Use
5481 Z_packet_to_target_hw_bp_type.
5482
5483 2014-05-20 Pedro Alves <palves@redhat.com>
5484
5485 * linux-aarch64-low.c: Include break-common.h.
5486 (enum target_point_type): Delete.
5487 (Z_packet_to_point_type): Rename to ...
5488 (Z_packet_to_target_hw_bp_type): ... this, and return a
5489 target_hw_bp_type instead.
5490 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5491 instead of an enum target_point_type.
5492 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5493 breakpoint type.
5494 (aarch64_dr_state_insert_one_point)
5495 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5496 (aarch64_handle_aligned_watchpoint)
5497 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5498 Take an enum target_hw_bp_type instead of an enum
5499 target_point_type.
5500 (aarch64_supports_z_point_type): New function.
5501 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5502 use Z_packet_to_target_hw_bp_type.
5503
5504 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5505
5506 * configure.ac: Only use -Werror by default when DEVELOPMENT
5507 is true.
5508 * configure: Regenerate.
5509
5510 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5511
5512 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5513 * linux-x86-low.c (X86_64_USER_REGS): New.
5514 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5515
5516 2014-04-28 Yao Qi <yao@codesourcery.com>
5517
5518 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5519 name.
5520
5521 2014-04-25 Pedro Alves <palves@redhat.com>
5522
5523 PR server/16255
5524 * linux-low.c (linux_attach_fail_reason_string): New function.
5525 (linux_attach_lwp): Delete.
5526 (linux_attach_lwp_1): Rename to ...
5527 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5528 argument. Remove "initial" parameter. Return int instead of
5529 void. Don't error or warn here.
5530 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5531 failure to attach to the tgid. Call warning when failing to
5532 attach to an lwp.
5533 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5534 argument. Remove "initial" parameter. Return int instead of
5535 void. Don't error or warn here.
5536 (linux_attach_fail_reason_string): New declaration.
5537 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5538 interface change. Use linux_attach_fail_reason_string.
5539
5540 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5541 Walfred Tedeschi <walfred.tedeschi@intel.com>
5542
5543 * Makefile.in: Added rules to handle new files
5544 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5545 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5546 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5547 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5548 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5549 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5550 x32-avx512-linux.o.
5551 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5552 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5553 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5554 i386/x32-avx512.xml.
5555 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5556 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5557 i386/x32-avx512-linux.xml.
5558 * i387-fp.c (num_avx512_k_registers): New constant for number
5559 of K registers.
5560 (num_avx512_zmmh_low_registers): New constant for number of
5561 lower ZMM registers (0-15).
5562 (num_avx512_zmmh_high_registers): New constant for number of
5563 higher ZMM registers (16-31).
5564 (num_avx512_ymmh_registers): New contant for number of higher
5565 YMM registers (ymm16-31 added by avx521 on x86_64).
5566 (num_avx512_xmm_registers): New constant for number of higher
5567 XMM registers (xmm16-31 added by AVX512 on x86_64).
5568 (struct i387_xsave): Add space for AVX512 registers.
5569 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5570 Add code to handle AVX512 registers.
5571 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5572 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5573 prototypei from generated file.
5574 (tdesc_amd64_avx512_linux): Likewise.
5575 (init_registers_x32_avx512_linux): Likewise.
5576 (tdesc_x32_avx512_linux): Likewise.
5577 (init_registers_i386_avx512_linux): Likewise.
5578 (tdesc_i386_avx512_linux): Likewise.
5579 (x86_64_regmap): Add AVX512 registers.
5580 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5581 mask.
5582 (initialize_low_arch): Add code to initialize AVX512 registers.
5583
5584 2014-04-23 Pedro Alves <palves@redhat.com>
5585
5586 * mem-break.c (find_gdb_breakpoint_at): Make static.
5587 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5588
5589 2014-04-23 Pedro Alves <palves@redhat.com>
5590
5591 * i386-low.c: Don't include break-common.h here.
5592 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5593 prototype to take target_hw_bp_type as argument instead of a Z
5594 packet char.
5595 * i386-low.h: Include break-common.h here.
5596 (Z_packet_to_hw_type): Declare.
5597 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5598 prototypes.
5599 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5600 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5601 (x86_remove_point): Convert the packet number to a
5602 target_hw_bp_type before calling i386_low_remove_watchpoint.
5603 * win32-i386-low.c (i386_insert_point): Convert the packet number
5604 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5605 (i386_remove_point): Convert the packet number to a
5606 target_hw_bp_type before calling i386_low_remove_watchpoint.
5607
5608 2014-04-23 Pedro Alves <palves@redhat.com>
5609
5610 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5611
5612 2014-04-10 Pedro Alves <palves@redhat.com>
5613
5614 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5615 Check if the condition or command is NULL before checking if the
5616 breakpoint is known. On success, return true.
5617 * mem-break.h (add_breakpoint_condition): Document return.
5618 (add_breakpoint_commands): Add describing comment.
5619 * server.c (skip_to_semicolon): New function.
5620 (process_point_options): Use it.
5621
5622 2014-04-09 Pedro Alves <palves@redhat.com>
5623
5624 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5625 to lwpid_of.
5626
5627 2014-02-27 Pedro Alves <palves@redhat.com>
5628
5629 PR 12702
5630 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5631 macros.
5632 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5633 output.
5634 (last_thread_of_process_p): Take a PID argument instead of a
5635 thread pointer.
5636 (linux_wait_for_lwp): Delete.
5637 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5638 functions.
5639 (linux_low_filter_event): New function, party factored out from
5640 linux_wait_for_event.
5641 (linux_wait_for_event): Rename to ...
5642 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5643 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5644 sigsuspend. Check for zombie leaders.
5645 (linux_wait_for_event): Reimplement as wrapper around
5646 linux_wait_for_event_filtered.
5647 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5648 a normal or signal exit is seen, it's the whole process exiting.
5649 (wait_for_sigstop): No longer a for_each_inferior callback.
5650 Rewrite on top of linux_wait_for_event_filtered.
5651 (stop_all_lwps): Call wait_for_sigstop directly.
5652 * server.c (resume, handle_target_event): Handle
5653 TARGET_WAITKIND_NO_RESUMED.
5654
5655 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5656
5657 * win32-low.c (psapi_get_dll_name,
5658 * win32_CreateToolhelp32Snapshot): Delete.
5659 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5660 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5661 Delete.
5662 (handle_load_dll): Add function description.
5663 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5664
5665 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5666
5667 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5668 Add comment.
5669 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5670 base address when calling win32_add_one_solib.
5671 (handle_load_dll): Delete local variable load_addr.
5672 Remove 0x1000 offset applied to DLL base address when calling
5673 win32_add_one_solib.
5674 (handle_unload_dll): Add comment.
5675
5676 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5677
5678 * win32-low.c (win32_add_all_dlls): Renames
5679 win32_ensure_ntdll_loaded. Rewrite function documentation.
5680 Adjust implementation to always load all DLLs.
5681 Add 0x1000 offset to DLL base address when calling
5682 win32_add_one_solib.
5683 (child_initialization_done): New static global.
5684 (do_initial_child_stuff): Set child_initialization_done to
5685 zero during child initialization, and 1 after. Replace call
5686 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5687 Add comment.
5688 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5689 (handle_unload_dll): Add function documentation.
5690 (get_child_debug_event): Ignore load and unload DLL events
5691 during child initialization.
5692
5693 2014-02-20 Doug Evans <dje@google.com>
5694
5695 Remove global all_lwps.
5696 * inferiors.h (ptid_of): Move here from linux-low.h.
5697 (pid_of, lwpid_of): Ditto.
5698 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5699 parameter is a struct thread_info * now.
5700 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5701 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5702 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5703 directly.
5704 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5705 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5706 * linux-arm-low.c (update_registers_callback): Update, "entry"
5707 parameter is a struct thread_info * now.
5708 Fetch lwpid from current_inferior directly.
5709 (arm_insert_point): Pass &all_threads to find_inferior instead of
5710 &all_lwps.
5711 (arm_remove_point): Ditto.
5712 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5713 (arm_prepare_to_resume): Fetch pid from thread.
5714 (arm_read_description): Fetch lwpid from current_inferior directly.
5715 * linux-low.c (all_lwps): Delete.
5716 (delete_lwp): Delete call to remove_inferior.
5717 (handle_extended_wait): Fetch lwpid from thread.
5718 (add_lwp): Don't set lwp->entry.id. Remove call to
5719 add_inferior_to_list.
5720 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5721 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5722 (kill_one_lwp_callback): Ditto.
5723 (linux_kill): Don't dereference NULL pointer.
5724 Fetch ptid,lwpid from thread.
5725 (get_detach_signal): Fetch ptid from thread.
5726 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5727 Simplify call to regcache_invalidate_thread.
5728 (delete_lwp_callback): Update, "entry" parameter is a
5729 struct thread_info * now. Fetch pid from thread.
5730 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5731 (status_pending_p_callback): Update, "entry" parameter is a
5732 struct thread_info * now. Fetch ptid from thread.
5733 (find_lwp_pid): Update, "entry" parameter is a
5734 struct thread_info * now.
5735 (linux_wait_for_lwp): Fetch pid from thread.
5736 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5737 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5738 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5739 (dequeue_one_deferred_signal): Ditto.
5740 (cancel_breakpoint): Fetch ptid from current_inferior.
5741 (linux_wait_for_event): Pass &all_threads to find_inferior,
5742 not &all_lwps. Fetch ptid, lwpid from thread.
5743 (count_events_callback): Update, "entry" parameter is a
5744 struct thread_info * now.
5745 (select_singlestep_lwp_callback): Ditto.
5746 (select_event_lwp_callback): Ditto.
5747 (cancel_breakpoints_callback): Ditto.
5748 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5749 not &all_lwps.
5750 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5751 (unsuspend_one_lwp): Update, "entry" parameter is a
5752 struct thread_info * now.
5753 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5754 not &all_lwps.
5755 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5756 Fetch lwpid from thread, not lwp.
5757 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5758 Pass &all_threads to find_inferior, not &all_lwps.
5759 (send_sigstop): Fetch lwpid from thread, not lwp.
5760 (send_sigstop_callback): Update, "entry" parameter is a
5761 struct thread_info * now.
5762 (suspend_and_send_sigstop_callback): Ditto.
5763 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5764 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5765 struct thread_info * now.
5766 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5767 from thread, lwp.
5768 (lwp_running): Update, "entry" parameter is a
5769 struct thread_info * now.
5770 (stop_all_lwps): Fetch ptid from thread.
5771 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5772 (linux_resume_one_lwp): Fetch lwpid from thread.
5773 (linux_set_resume_request): Update, "entry" parameter is a
5774 struct thread_info * now. Fetch pid, lwpid from thread.
5775 (resume_status_pending_p): Update, "entry" parameter is a
5776 struct thread_info * now.
5777 (need_step_over_p): Ditto. Fetch lwpid from thread.
5778 (start_step_over): Fetch lwpid from thread.
5779 (linux_resume_one_thread): Update, "entry" parameter is a
5780 struct thread_info * now. Fetch lwpid from thread.
5781 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5782 (proceed_one_lwp): Update, "entry" parameter is a
5783 struct thread_info * now. Fetch lwpid from thread.
5784 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5785 struct thread_info * now.
5786 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5787 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5788 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5789 directly.
5790 (regsets_store_inferior_registers): Ditto.
5791 (fetch_register, store_register): Ditto.
5792 (linux_read_memory, linux_write_memory): Ditto.
5793 (linux_request_interrupt): Ditto.
5794 (linux_read_auxv): Ditto.
5795 (linux_xfer_siginfo): Ditto.
5796 (linux_qxfer_spu): Ditto.
5797 (linux_qxfer_libraries_svr4): Ditto.
5798 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5799 moved to inferiors.h.
5800 (get_lwp): Delete.
5801 (get_thread_lwp): Update.
5802 (struct lwp_info): Delete member "entry". Simplify comment for
5803 member "thread".
5804 (all_lwps): Delete.
5805 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5806 current_inferior directly.
5807 (update_watch_registers_callback): Update, "entry" parameter is a
5808 struct thread_info * now. Fetch pid from thread.
5809 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5810 (mips_insert_point): Fetch lwpid from current_inferior.
5811 Pass &all_threads to find_inferior, not &all_lwps.
5812 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5813 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5814 directly.
5815 (mips_stopped_data_address): Ditto.
5816 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5817 directly.
5818 * linux-tile-low.c (tile_arch_setup): Ditto.
5819 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5820 (update_debug_registers_callback): Update, "entry" parameter is a
5821 struct thread_info * now. Fetch pid from thread.
5822 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5823 Pass &all_threads to find_inferior, not &all_lwps.
5824 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5825 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5826 Pass &all_threads to find_inferior, not &all_lwps.
5827 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5828 (i386_dr_low_get_status): Ditto.
5829 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5830 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5831 (x86_linux_read_description): Ditto.
5832 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5833
5834 2014-02-20 Doug Evans <dje@google.com>
5835
5836 * inferiors.c (get_first_inferior): Fix buglet.
5837
5838 2014-02-19 Doug Evans <dje@google.com>
5839
5840 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5841 * inferiors.c (add_thread): Change result type to struct thread_info *.
5842 All callers updated.
5843 (add_lwp): Call add_thread here instead of in callers.
5844 All callers updated.
5845 * linux-low.h (get_lwp_thread): Rewrite.
5846 (struct lwp_info): New member "thread".
5847
5848 2014-02-19 Doug Evans <dje@google.com>
5849
5850 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5851 All callers updated.
5852
5853 2014-02-19 Doug Evans <dje@google.com>
5854
5855 * inferiors.c (add_thread): Fix whitespace.
5856
5857 2014-02-19 Doug Evans <dje@google.com>
5858
5859 * dll.c (clear_dlls): Replace accessing list implemention details
5860 with API function.
5861 * gdbthread.h (get_first_thread): Declare.
5862 * inferiors.c (for_each_inferior_with_data): New function.
5863 (get_first_thread): New function.
5864 (find_thread_ptid): Simplify.
5865 (get_first_inferior): New function.
5866 (clear_list): Delete.
5867 (one_inferior_p): New function.
5868 (clear_inferior_list): New function.
5869 (clear_inferiors): Update.
5870 * inferiors.h (for_each_inferior_with_data): Declare.
5871 (clear_inferior_list): Declare.
5872 (one_inferior_p): Declare.
5873 (get_first_inferior): Declare.
5874 * linux-low.c (linux_wait_for_event): Replace accessing list
5875 implemention details with API function.
5876 * server.c (target_running): Ditto.
5877 (accumulate_file_name_length): New function.
5878 (emit_dll_description): New function.
5879 (handle_qxfer_libraries): Replace accessing list implemention
5880 details with API function.
5881 (handle_qxfer_threads_worker): New function.
5882 (handle_qxfer_threads_proper): Replace accessing list implemention
5883 details with API function.
5884 (handle_query): Ditto.
5885 (visit_actioned_threads_callback_ftype): New typedef.
5886 (visit_actioned_threads_data): New struct.
5887 (visit_actioned_threads): Rewrite to be find_inferior callback.
5888 (resume): Call find_inferior.
5889 (handle_status): Replace accessing list implemention
5890 details with API function.
5891 (process_serial_event): Replace accessing list implemention details
5892 with API function.
5893 * target.c (set_desired_inferior): Replace accessing list implemention
5894 details with API function.
5895 * tracepoint.c (same_process_p): New function.
5896 (gdb_agent_about_to_close): Replace accessing list implemention
5897 details with API function.
5898 * win32-low.c (child_delete_thread): Replace accessing list
5899 implemention details with API function.
5900 (match_dll_by_basename): New function.
5901 (dll_is_loaded_by_basename): New function.
5902 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5903 details call to dll_is_loaded_by_basename.
5904
5905 2014-02-19 Doug Evans <dje@google.com>
5906
5907 * dll.h (struct dll_info): Add comment.
5908 * gdbthread.h (struct thread_info): Add comment.
5909 (current_ptid): Simplify.
5910 * inferiors.c (add_process): Update.
5911 (remove_process): Update.
5912 * inferiors.h (struct process_info): Rename member "head" to "entry".
5913 * linux-low.c (delete_lwp): Update.
5914 (add_lwp): Update.
5915 (last_thread_of_process_p): Update.
5916 (kill_one_lwp_callback, linux_kill): Update.
5917 (status_pending_p_callback): Update.
5918 (wait_for_sigstop): Update. Simplify read of ptid.
5919 (start_step_over): Update.
5920 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5921 (get_lwp_thread): Update.
5922 (struct lwp_info): Rename member "head" to "entry".
5923 * regcache.h (inferior_list_entry): Delete.
5924 * server.c (kill_inferior_callback): Update.
5925 (detach_or_kill_inferior_callback): Update.
5926 (print_started_pid): Update.
5927 (print_attached_pid): Update.
5928 (process_serial_event): Simplify read of ptid.
5929 * thread-db.c (thread_db_create_event): Update.
5930 (thread_db_get_tls_address): Update.
5931 * win32-low.c (current_inferior_ptid): Simplify.
5932
5933 2014-02-19 Tom Tromey <tromey@redhat.com>
5934
5935 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5936 argument.
5937 (target_supports_btrace): Update.
5938
5939 2014-02-14 Yao Qi <yao@codesourcery.com>
5940
5941 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5942 (rsp-low-ipa.o): New target.
5943
5944 2014-02-12 Tom Tromey <tromey@redhat.com>
5945
5946 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5947 convert_ascii_to_int.
5948 * regcache.c (registers_to_string): Likewise.
5949 * remote-utils.c (decode_M_packet): Likewise.
5950 * server.c (process_serial_event): Likewise.
5951
5952 2014-02-12 Tom Tromey <tromey@redhat.com>
5953
5954 * server.c (handle_query, handle_v_run): Use hex2bin, not
5955 unhexify.
5956 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5957
5958 2014-02-12 Tom Tromey <tromey@redhat.com>
5959
5960 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5961 convert_int_to_ascii.
5962 * regcache.c (registers_to_string, collect_register_as_string):
5963 Likewise.
5964 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5965 Likewise.
5966 * server.c (process_serial_event): Likewise.
5967 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5968 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5969
5970 2014-02-12 Tom Tromey <tromey@redhat.com>
5971
5972 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5973 bin2hex, not hexify.
5974 * tracepoint.c (cmd_qtstatus): Likewise.
5975
5976 2014-02-12 Tom Tromey <tromey@redhat.com>
5977
5978 * remote-utils.c (monitor_output): Pass explicit length to
5979 hexify.
5980
5981 2014-02-12 Tom Tromey <tromey@redhat.com>
5982
5983 * tracepoint.c: Include rsp-low.h.
5984 * server.c: Include rsp-low.h.
5985 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5986 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5987 declare.
5988 * remote-utils.c: Include rsp-low.h.
5989 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5990 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5991 (convert_int_to_ascii, convert_ascii_to_int): Move to
5992 common/rsp-low.c.
5993 * regcache.c: Include rsp-low.h.
5994 * ax.c: Include rsp-low.h.
5995 * Makefile.in (SFILES): Add common/rsp-low.c.
5996 (OBS): Add rsp-low.o.
5997 (rsp-low.o): New target.
5998
5999 2014-02-12 Tom Tromey <tromey@redhat.com>
6000
6001 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6002 Include print-utils.h.
6003 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6004 (plongest, thirty_two, phex_nz): Remove.
6005 * Makefile.in (SFILES): Add common/print-utils.c.
6006 (OBS): Add print-utils.o.
6007 (print-utils-ipa.o): New target.
6008 (print-utils.o): New target.
6009 (IPA_OBJS): Add print-utils-ipa.o.
6010
6011 2014-02-06 Tom Tromey <tromey@redhat.com>
6012
6013 * Makefile.in (SFILES): Fix indentation.
6014
6015 2014-02-05 Doug Evans <dje@google.com>
6016
6017 * linux-low.c (linux_wait_for_event): Improve comment.
6018 (linux_wait_1): Keep current_inferior in sync with event_child.
6019
6020 2014-01-22 Doug Evans <dje@google.com>
6021
6022 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6023
6024 2014-01-22 Doug Evans <dje@google.com>
6025
6026 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6027 * configure: Regenerate.
6028 * config.in: Regenerate.
6029 * Makefile.in (SFILES): Add debug.c.
6030 (OBS): Add debug.o.
6031 * debug.c: New file.
6032 * debug.h: New file.
6033 * linux-aarch64-low.c (*): Update all debugging printfs to use
6034 debug_printf instead of fprintf.
6035 * linux-arm-low.c (*): Ditto.
6036 * linux-cris-low.c (*): Ditto.
6037 * linux-crisv32-low.c (*): Ditto.
6038 * linux-m32r-low.c (*): Ditto.
6039 * linux-sparc-low.c (*): Ditto.
6040 * linux-x86.c (*): Ditto.
6041 * linux-low.c (*): Ditto.
6042 (linux_wait_1): Add calls to debug_enter, debug_exit.
6043 (linux_wait): Remove redundant debugging printf.
6044 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6045 (linux_resume, unstop_all_lwps): Ditto.
6046 * mem-break.c (*): Update all debugging printfs to use
6047 debug_printf instead of fprintf.
6048 * remote-utils.c (*): Ditto.
6049 * thread-db.c (*): Ditto.
6050 * server.c #include <ctype.h>, "gdb_vecs.h".
6051 (debug_threads): Moved to debug.c.
6052 (*): Update all debugging printfs to use debug_printf instead of
6053 fprintf.
6054 (start_inferior): Replace call to fflush with call to debug_flush.
6055 (monitor_show_help): Mention set debug-format.
6056 (parse_debug_format_options): New function.
6057 (handle_monitor_command): Handle "monitor set debug-format".
6058 (gdbserver_usage): Mention --debug-format.
6059 (main): Parse --debug-format.
6060 * server.h (debug_threads): Declaration moved to debug.h.
6061 #include "debug.h".
6062 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6063 trace_debug_1 that uses debug_printf.
6064 (tracepoint_look_up_symbols): Update all debugging printfs to use
6065 debug_printf instead of fprintf.
6066
6067 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6068
6069 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6070 sys/ptrace.h.
6071
6072 2014-01-17 Pedro Alves <palves@redhat.com>
6073
6074 PR build/16445
6075 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6076 defined after including gdb_proc_service.h.
6077
6078 2014-01-16 Doug Evans <dje@google.com>
6079
6080 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6081 (match_dll): Use it.
6082
6083 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6084
6085 * target.h (target_ops) <read_btrace>: Change parameters and
6086 return type to allow error reporting.
6087 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6088 trace reading errors on.
6089 * linux-low.c (linux_low_read_btrace): Pass trace reading
6090 errors on.
6091 (linux_low_disable_btrace): New.
6092
6093 2014-01-15 Doug Evans <dje@google.com>
6094
6095 * inferiors.c (thread_id_to_gdb_id): Delete.
6096 * inferiors.h (thread_id_to_gdb_id): Delete.
6097
6098 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6099
6100 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6101 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6102 versions.
6103
6104 2014-01-08 Pedro Alves <palves@redhat.com>
6105
6106 * server.c (handle_status): Don't discard previous queued stop
6107 replies or thread's pending status here.
6108 (main) <disconnection>: Do it here instead.
6109
6110 2014-01-08 Pedro Alves <palves@redhat.com>
6111
6112 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6113 * server.c (visit_actioned_threads, handle_pending_status): New
6114 function.
6115 (handle_v_cont): Factor out parts to ...
6116 (resume): ... this new function. If in all-stop, and a thread
6117 being resumed has a pending status, report it without actually
6118 resuming.
6119 (myresume): Adjust to use the new 'resume' function.
6120 (clear_pending_status_callback, set_pending_status_callback)
6121 (find_status_pending_thread_callback): New functions.
6122 (handle_status): Handle the case of multiple threads having
6123 interesting statuses to report. Report threads' real last signal
6124 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6125 with an interesting thread to report the status for, instead of
6126 always reporting the status of the first thread.
6127
6128 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6129
6130 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6131 * gdbreplay.c (gdbreplay_version): Likewise.
6132
6133 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6134
6135 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6136 iov.iov_len with the real length in use.
6137
6138 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6139
6140 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6141 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6142 for all targets that use win32-low.c.
6143 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6144 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6145
6146 2013-12-13 Pedro Alves <palves@redhat.com>
6147
6148 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6149 if equal to TARGET_WAITKIND_LOADED.
6150 * win32-low.c (cached_status): New static global.
6151 (win32_wait): Add declaration.
6152 (do_initial_child_stuff): Flush all initial pending debug events
6153 up to the initial breakpoint.
6154 (win32_wait): If CACHED_STATUS was set, return that instead
6155 of doing a real wait. Remove the code resuming the execution
6156 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6157 during the initial phase. Also remove the code changing
6158 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6159 TARGET_WAITKIND_STOPPED.
6160
6161 2013-12-11 Yao Qi <yao@codesourcery.com>
6162
6163 * notif.c (handle_notif_ack): Return 0 if no notification
6164 matches.
6165
6166 2013-11-20 Doug Evans <dje@google.com>
6167
6168 * linux-low.c (linux_set_resume_request): Fix comment.
6169
6170 2013-11-20 Doug Evans <dje@google.com>
6171
6172 * linux-low.c (resume_status_pending_p): Tweak comment.
6173
6174 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6175
6176 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6177 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6178 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6179 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6180 (srv_amd64_regobj): Add amd64-mpx.o.
6181 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6182 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6183 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6184 * i387-fp.c (num_pl_bnd_register) Added constant.
6185 (num_pl_bnd_cfg_registers) Added constant.
6186 (struct i387_xsave) Added reserved area and MPX fields.
6187 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6188 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6189 function.
6190 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6191 (init_registers_amd64_mpx_linux): Declare new function.
6192 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6193 (x86_64_regmap): Add MPX registers.
6194 (x86_linux_read_description): Add MPX case.
6195 (initialize_low_arch): Initialize MPX targets.
6196
6197 2013-11-18 Tom Tromey <tromey@redhat.com>
6198
6199 * configure: Rebuild.
6200 * configure.ac: Don't check for stdlib.h.
6201 * gdbreplay.c: Unconditionally include stdlib.h.
6202
6203 2013-11-18 Tom Tromey <tromey@redhat.com>
6204
6205 * config.in: Rebuild.
6206 * configure: Rebuild.
6207 * configure.ac: Don't use AC_HEADER_DIRENT.
6208
6209 2013-11-18 Tom Tromey <tromey@redhat.com>
6210
6211 * server.h: Don't check HAVE_STRING_H.
6212 * gdbreplay.c: Don't check HAVE_STRING_H.
6213 * configure: Rebuild.
6214
6215 2013-11-18 Tom Tromey <tromey@redhat.com>
6216
6217 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6218 LIBGNU.
6219
6220 2013-11-08 Tom Tromey <tromey@redhat.com>
6221
6222 * configure, config.in: Rebuild.
6223 * configure.ac: Remove unused configury.
6224
6225 2013-11-08 Tom Tromey <tromey@redhat.com>
6226
6227 * acinclude.m4: Include common.m4, codeset.m4.
6228 * configure, config.in: Rebuild.
6229 * configure.ac: Use GDB_AC_COMMON.
6230
6231 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6232
6233 * linux-s390-low.c (HWCAP_S390_TE): New define.
6234 (s390_arch_setup): Consider the TE field in the HWCAP for
6235 determining 'have_regset_tdb'.
6236
6237 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6238
6239 PR gdb/16014
6240 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6241 call to sizeof.
6242
6243 2013-10-02 Pedro Alves <palves@redhat.com>
6244
6245 * server.c (process_serial_event): Don't output "GDBserver
6246 exiting" if GDB is connected through stdio.
6247 * target.c (mywait): Likewise, be silent if GDB is connected
6248 through stdio.
6249
6250 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6251
6252 * lynx-low.c (lynx_add_threads_after_attach): New function.
6253 (lynx_attach): Remove call to add_thread. Add call to
6254 lynx_add_threads_after_attach instead.
6255
6256 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6257
6258 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6259 * config.in, configure: Regenerated.
6260
6261 2013-09-18 Yao Qi <yao@codesourcery.com>
6262
6263 PR server/15959
6264 * server.c (start_inferior): Clear 'resume_info'.
6265
6266 2013-09-16 Jiong Wang <jiwang@tilera.com>
6267
6268 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6269 for each register.
6270
6271 2013-09-16 Jiong Wang <jiwang@tilera.com>
6272
6273 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6274 linux-tile-low.o to srv_tgtobj.
6275
6276 2013-09-16 Will Newton <will.newton@linaro.org>
6277
6278 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6279 out regs.
6280
6281 2013-09-06 Pedro Alves <palves@redhat.com>
6282
6283 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6284 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6285 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6286 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6287 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6288 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6289
6290 2013-09-06 Pedro Alves <palves@redhat.com>
6291
6292 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6293 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6294
6295 2013-09-06 Pedro Alves <palves@redhat.com>
6296
6297 * linux-amd64-ipa.c: Include tracepoint.h.
6298 * linux-i386-ipa.c: Include tracepoint.h.
6299
6300 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6301
6302 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6303 (ps_get_thread_area): New function.
6304
6305 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6306
6307 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6308 (initialize_low_arch): Call init_registers_crisv32 rather than
6309 init_register_crisv32.
6310
6311 2013-09-05 Pedro Alves <palves@redhat.com>
6312
6313 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6314 to ...
6315 * hostio.h: ... this new file.
6316 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6317 win32-low.c: Include hostio.h.
6318
6319 2013-09-05 Pedro Alves <palves@redhat.com>
6320
6321 * server.h (gdb_client_data, handler_func, callback_handler_func)
6322 (delete_file_handler, add_file_handler, append_callback_event)
6323 (delete_callback_event, start_event_loop, initialize_event_loop):
6324 Move to event-loop.h and include it.
6325 * event-loop.h: New file.
6326
6327 2013-09-05 Pedro Alves <palves@redhat.com>
6328
6329 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6330 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6331 (loaded_dll, unloaded_dll): Move to ...
6332 * dll.h: ... this new file.
6333 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6334
6335 2013-09-05 Pedro Alves <palves@redhat.com>
6336
6337 * server.h (current_process, get_thread_process, all_processes)
6338 (add_inferior_to_list, for_each_inferior, current_inferior)
6339 (remove_inferior, add_process, remove_process, find_process_pid)
6340 (have_started_inferiors_p, have_attached_inferiors_p)
6341 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6342 (clear_inferiors, find_inferior, find_inferior_id)
6343 (inferior_target_data, set_inferior_target_data)
6344 (inferior_regcache_data, set_inferior_regcache_data): Move to
6345 inferiors.h, and include it.
6346 * inferiors.h: New file.
6347
6348 2013-09-05 Pedro Alves <palves@redhat.com>
6349
6350 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6351 Move ...
6352 * ax.h: ... here.
6353
6354 2013-09-05 Pedro Alves <palves@redhat.com>
6355
6356 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6357 tracepoint.h.
6358 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6359 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6360 (handle_tracepoint_general_set, handle_tracepoint_query)
6361 (tracepoint_finished_step, tracepoint_was_hit)
6362 (release_while_stepping_state_list, current_traceframe)
6363 (in_readonly_region, traceframe_read_mem)
6364 (fetch_traceframe_registers, traceframe_read_sdata)
6365 (traceframe_read_info, struct fast_tpoint_collect_status)
6366 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6367 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6368 (supply_fast_tracepoint_registers)
6369 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6370 (ipa_tdesc, claim_trampoline_space)
6371 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6372 (agent_mem_read, agent_get_trace_state_variable_value)
6373 (agent_set_trace_state_variable_value, agent_tsv_read)
6374 (agent_mem_read_string, get_raw_reg_func_addr)
6375 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6376 * tracepoint.h: ... this new file.
6377
6378 2013-09-05 Pedro Alves <palves@redhat.com>
6379
6380 * server.h (perror_with_name, error, fatal, warning, paddress)
6381 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6382 include it.
6383 * utils.h: New file.
6384
6385 2013-09-05 Pedro Alves <palves@redhat.com>
6386
6387 * server.h (remote_debug, noack_mode, transport_is_reliable)
6388 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6389 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6390 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6391 (write_enn, initialize_async_io, enable_async_io)
6392 (disable_async_io, check_remote_input_interrupt_request)
6393 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6394 (dead_thread_notify, prepare_resume_reply)
6395 (decode_address_to_semicolon, decode_address, decode_m_packet)
6396 (decode_M_packet, decode_X_packet, decode_xfer_write)
6397 (decode_search_memory_packet, unhexify, hexify)
6398 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6399 (look_up_one_symbol, relocate_instruction)
6400 (monitor_output): Move to remote-utils.h, and include it.
6401 * remote-utils.h: New file.
6402
6403 2013-09-05 Pedro Alves <palves@redhat.com>
6404
6405 * server.h (_): Delete.
6406
6407 2013-09-02 Pedro Alves <palves@redhat.com>
6408
6409 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6410 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6411 allocated.
6412 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6413
6414 2013-09-02 Pierre Muller <muller@sourceware.org>
6415
6416 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6417 or WriteProcessMemory complete successfully and handle
6418 ERROR_PARTIAL_COPY error.
6419
6420 2013-09-02 Pedro Alves <palves@redhat.com>
6421
6422 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6423 error instead of EIO.
6424
6425 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6426
6427 PR server/15604
6428 * linux-low.c: Include filestuff.h.
6429 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6430 * lynx-low.c: Include filestuff.h.
6431 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6432 * server.c: Include filestuff.h.
6433 (main): Call notice_open_fds.
6434 * spu-low.c: Include filestuff.h.
6435 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6436
6437 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6438
6439 * Makefile.in: Explain why ../target and ../nat are not
6440 listed as include file search paths.
6441 (linux-waitpid.o): New object file rule.
6442 * configure.srv (srv_native_linux_obj): New variable.
6443 Replace all occurrences of linux native object files with
6444 $srv_native_linux_obj.
6445 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6446 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6447 (linux_enable_event_reporting): Remove declaration.
6448 (my_waitpid): Moved to common/linux-waitpid.c.
6449 (linux_wait_for_event): Pass ptid when calling
6450 linux_enable_event_reporting.
6451 (linux_supports_tracefork_flag): Remove.
6452 (linux_enable_event_reporting): Likewise.
6453 (linux_tracefork_grandchild): Remove.
6454 (STACK_SIZE): Moved to common/linux-ptrace.c.
6455 (linux_tracefork_child): Remove.
6456 (linux_test_for_tracefork): Remove.
6457 (linux_look_up_symbols): Call linux_supports_traceclone.
6458 (initialize_low): Remove call to linux_test_for_tracefork.
6459 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6460 common/linux-ptrace.h.
6461 (PTRACE_TYPE_ARG4): Likewise.
6462 Include linux-ptrace.h.
6463
6464 2013-08-21 Pedro Alves <palves@redhat.com>
6465
6466 * config.in: Renegerate.
6467
6468 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6469
6470 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6471 (SFILES): Remove $(srcdir)/common/target-common.c and
6472 add $(srcdir)/target/waitstatus.c.
6473 (OBS): Remove target-common.o and add waitstatus.o.
6474 (server_h): Remove $(srcdir)/../common/target-common.h and
6475 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6476 and $(srcdir)/../target/waitstatus.h.
6477 (target-common.o): Remove.
6478 (waitstatus.o): New target object file.
6479 * target.h: Do not include target-common.h and
6480 include target/resume.h, target/wait.h and
6481 target/waitstatus.h.
6482
6483 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6484
6485 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6486 to PTRACE_TYPE_ARG3.
6487 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6488 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6489 PTRACE_TYPE_ARG4.
6490 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6491 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6492
6493 2013-07-27 Jie Zhang <jie@codesourcery.com>
6494 Daniel Jacobowitz <dan@codesourcery.com>
6495 Yao Qi <yao@codesourcery.com>
6496
6497 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6498 (mips-linux-watch.o): New rule.
6499 (mips_linux_watch_h): New variable.
6500 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6501 srv_tgtobj.
6502 * linux-mips-low.c: Include mips-linux-watch.h.
6503 (struct arch_process_info, struct arch_lwp_info): New.
6504 (update_watch_registers_callback): New function.
6505 (mips_linux_new_process, mips_linux_new_thread) New functions.
6506 (mips_linux_prepare_to_resume, mips_insert_point): New
6507 functions.
6508 (mips_remove_point, mips_stopped_by_watchpoint): New
6509 functions.
6510 (rsp_bp_type_to_target_hw_bp_type): New function.
6511 (mips_stopped_data_address): New function.
6512 (the_low_target): Add watchpoint support functions.
6513
6514 2013-07-27 Yao Qi <yao@codesourcery.com>
6515
6516 * i386-low.c: Include break-common.h.
6517 (enum target_hw_bp_type): Remove.
6518
6519 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6520
6521 * Makefile.in (SFILES): /common/target-common.c.
6522 (OBS): Add target-common.o.
6523 (server_h): Add $(srcdir)/../common/target-common.h.
6524 (target-common.o): New target.
6525 * server.c (queue_stop_reply_callback): Free
6526 status string after use.
6527 * target.c (target_waitstatus_to_string): Remove.
6528 * target.h: Include target-common.h.
6529 (resume_kind): Likewise.
6530 (target_waitkind): Likewise.
6531 (target_waitstatus): Likewise.
6532 (TARGET_WNOHANG): Likewise.
6533
6534 2013-07-04 Yao Qi <yao@codesourcery.com>
6535
6536 * Makefile.in (host_alias): Use @host_noncanonical@.
6537 (target_alias): Use @target_noncanonical@.
6538 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6539 ACX_NONCANONICAL_HOST.
6540 * configure: Regenerated.
6541
6542 Revert:
6543 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6544
6545 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6546 * configure: Rebuild.
6547 * Makefile.in (version_host, version_target): Get from configure.
6548 (version.c): Use $(version_host) and $(version_target).
6549
6550 2013-07-03 Pedro Alves <palves@redhat.com>
6551
6552 * Makefile.in (config.status): Depend on development.sh.
6553 * acinclude.m4: Include libmcheck.m4.
6554 * configure: Regenerate.
6555
6556 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6557
6558 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6559 attribute inside the parentheses.
6560 (winapi_DebugSetProcessKillOnExit): Ditto.
6561 (winapi_DebugBreakProcess): Ditto.
6562 (winapi_GenerateConsoleCtrlEvent): Ditto.
6563
6564 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6565
6566 * notif.h (notif_event): Add a dummy member to avoid compiler
6567 errors.
6568
6569 2013-07-01 Pedro Alves <palves@redhat.com>
6570
6571 * hostio.c (HOSTIO_PATH_MAX): Define.
6572 (require_filename, handle_open, handle_unlink, handle_readlink):
6573 Use it.
6574
6575 2013-07-01 Pedro Alves <palves@redhat.com>
6576
6577 * server.h: Include "pathmax.h".
6578 * linux-low.c: Don't include sys/param.h.
6579 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6580 MAXPATHLEN.
6581 * win32-low.c: Don't include sys/param.h.
6582 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6583
6584 2013-07-01 Pedro Alves <palves@redhat.com>
6585
6586 * event-loop.c: Don't check HAVE_UNISTD_H before including
6587 <unistd.h>.
6588 * gdbreplay.c: Likewise.
6589 * remote-utils.c: Likewise.
6590 * server.c: Likewise.
6591 * configure.ac: Don't check for unistd.h.
6592 * configure: Regenerate.
6593
6594 2013-06-28 Tom Tromey <tromey@redhat.com>
6595
6596 * Makefile.in (version.c): Use version.in, not
6597 common/version.in.
6598
6599 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6600
6601 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6602 * configure: Rebuild.
6603 * Makefile.in (version_host, version_target): Get from configure.
6604 (version.c): Use $(version_host) and $(version_target).
6605
6606 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6607
6608 Fix trace-status to output user name without trailing colon.
6609 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6610
6611 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6612
6613 Fix trace-status to output proper start-time and stop-time.
6614 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6615 output start time and stop time in hex as gdb expects.
6616
6617 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6618
6619 * tracepoint.c (build_traceframe_info_xml): Output trace state
6620 variables present in the trace buffer.
6621
6622 2013-06-24 Tom Tromey <tromey@redhat.com>
6623
6624 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6625 create-version.sh.
6626 (version.o): Remove.
6627 * gdbreplay.c: Include version.h.
6628 (version, host_name): Don't declare.
6629 * server.h: Include version.h.
6630 (version, host_name): Don't declare.
6631
6632 2013-06-12 Pedro Alves <palves@redhat.com>
6633
6634 * linux-x86-low.c (linux_is_elf64): Delete global.
6635 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6636 with local linux_pid_exe_is_elf_64_file use.
6637
6638 2013-06-11 Pedro Alves <palves@redhat.com>
6639
6640 * linux-low.c (regset_disabled, disable_regset): New functions.
6641 (regsets_fetch_inferior_registers)
6642 (regsets_store_inferior_registers): Use them.
6643 (initialize_regsets_info); Don't allocate the disabled_regsets
6644 array here.
6645 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6646 comment.
6647
6648 2013-06-11 Pedro Alves <palves@redhat.com>
6649
6650 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6651 xmalloc.
6652
6653 2013-06-11 Pedro Alves <palves@redhat.com>
6654
6655 * linux-x86-low.c (initialize_low_arch): Call
6656 init_registers_x32_avx_linux.
6657
6658 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6659
6660 Fix compatibility with Android Bionic.
6661 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6662 it is not empty.
6663
6664 2013-06-07 Pedro Alves <palves@redhat.com>
6665
6666 PR server/14823
6667 * Makefile.in (OBS): Add tdesc.o.
6668 (IPA_OBJS): Add tdesc-ipa.o.
6669 (tdesc-ipa.o): New rule.
6670 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6671 interface.
6672 * linux-low.c (new_inferior): Delete.
6673 (disabled_regsets, num_regsets): Delete.
6674 (linux_add_process): Adjust to set the new per-process
6675 new_inferior flag.
6676 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6677 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6678 was a stop. When calling arch_setup, switch the current inferior
6679 to the thread that got an event.
6680 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6681 (regsets_fetch_inferior_registers)
6682 (regsets_store_inferior_registers): New regsets_info parameter.
6683 Adjust to use it.
6684 (linux_register_in_regsets): New regs_info parameter. Adjust to
6685 use it.
6686 (register_addr, fetch_register, store_register): New usrregs_info
6687 parameter. Adjust to use it.
6688 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6689 parameter regs_info. Adjust to use it.
6690 (linux_fetch_registers): Get the current inferior's regs_info, and
6691 adjust to use it.
6692 (linux_store_registers): Ditto.
6693 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6694 (initialize_low): Don't initialize the target_regsets here. Call
6695 initialize_low_arch.
6696 * linux-low.h (target_regsets): Delete declaration.
6697 (struct regsets_info): New.
6698 (struct usrregs_info): New.
6699 (struct regs_info): New.
6700 (struct process_info_private) <new_inferior>: New field.
6701 (struct linux_target_ops): Delete the num_regs, regmap, and
6702 regset_bitmap fields. New field regs_info.
6703 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6704 * i387-fp.c (num_xmm_registers): Delete.
6705 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6706 calls to new interface.
6707 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6708 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6709 Infer the number of xmm registers from the regcache's target
6710 description.
6711 * i387-fp.h (num_xmm_registers): Delete.
6712 * inferiors.c (add_thread): Don't install the thread's regcache
6713 here.
6714 * proc-service.c (gregset_info): Fetch the current inferior's
6715 regs_info. Adjust to use it.
6716 * regcache.c: Include tdesc.h.
6717 (register_bytes, reg_defs, num_registers)
6718 (gdbserver_expedite_regs): Delete.
6719 (get_thread_regcache): If the thread doesn't have a regcache yet,
6720 create one, instead of aborting gdbserver.
6721 (regcache_invalidate_one): Rename to ...
6722 (regcache_invalidate_thread): ... this.
6723 (regcache_invalidate_one): New.
6724 (regcache_invalidate): Only invalidate registers of the current
6725 process.
6726 (init_register_cache): Add target_desc parameter, and use it.
6727 (new_register_cache): Ditto. Assert the target description has a
6728 non zero registers_size.
6729 (regcache_cpy): Add assertions. Adjust.
6730 (realloc_register_cache, set_register_cache): Delete.
6731 (registers_to_string, registers_from_string): Adjust.
6732 (find_register_by_name, find_regno, find_register_by_number)
6733 (register_cache_size): Add target_desc parameter, and use it.
6734 (free_register_cache_thread, free_register_cache_thread_one)
6735 (regcache_release, register_cache_size): New.
6736 (register_size): Add target_desc parameter, and use it.
6737 (register_data, supply_register, supply_register_zeroed)
6738 (supply_regblock, supply_register_by_name, collect_register)
6739 (collect_register_as_string, collect_register_by_name): Adjust.
6740 * regcache.h (struct target_desc): Forward declare.
6741 (struct regcache) <tdesc>: New field.
6742 (init_register_cache, new_register_cache): Add target_desc
6743 parameter.
6744 (regcache_invalidate_thread): Declare.
6745 (regcache_invalidate_one): Delete declaration.
6746 (regcache_release): Declare.
6747 (find_register_by_number, register_cache_size, register_size)
6748 (find_regno): Add target_desc parameter.
6749 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6750 declarations.
6751 * remote-utils.c: Include tdesc.h.
6752 (outreg, prepare_resume_reply): Adjust.
6753 * server.c: Include tdesc.h.
6754 (gdbserver_xmltarget): Delete declaration.
6755 (get_features_xml, process_serial_event): Adjust.
6756 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6757 declare.
6758 (struct process_info) <tdesc>: New field.
6759 (ipa_tdesc): Declare.
6760 * tdesc.c: New file.
6761 * tdesc.h: New file.
6762 * tracepoint.c: Include tdesc.h.
6763 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6764 (get_context_regcache): Adjust to pass ipa_tdesc down.
6765 (do_action_at_tracepoint): Adjust to get the register cache size
6766 from the context regcache's description.
6767 (traceframe_walk_blocks): Adjust to get the register cache size
6768 from the current trace frame's description.
6769 (traceframe_get_pc): Adjust to get current trace frame's
6770 description and pass it down.
6771 (gdb_collect): Adjust to get the register cache size from the
6772 IPA's description.
6773 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6774 (gdbserver_xmltarget): Delete.
6775 (initialize_low_tracepoint): Set the ipa's target description.
6776 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6777 (initialize_low_tracepoint): Set the ipa's target description.
6778 * linux-x86-low.c: Include tdesc.h.
6779 [__x86_64__] (is_64bit_tdesc): New.
6780 (ps_get_thread_area, x86_get_thread_area): Use it.
6781 (i386_cannot_store_register): Rename to ...
6782 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6783 (i386_cannot_fetch_register): Rename to ...
6784 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6785 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6786 to new interface.
6787 (target_regsets): Rename to ...
6788 (x86_regsets): ... this.
6789 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6790 interface.
6791 (x86_siginfo_fixup): Use is_64bit_tdesc.
6792 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6793 (tdesc_x32_avx_linux, tdesc_x32_linux)
6794 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6795 Declare.
6796 (x86_linux_update_xmltarget): Delete.
6797 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6798 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6799 (AMD64_LINUX_USER64_CS): New.
6800 (x86_linux_read_description): New, based on
6801 x86_linux_update_xmltarget.
6802 (same_process_callback): New.
6803 (x86_arch_setup_process_callback): New.
6804 (x86_linux_update_xmltarget): New.
6805 (x86_regsets_info): New.
6806 (amd64_linux_regs_info): New.
6807 (i386_linux_usrregs_info): New.
6808 (i386_linux_regs_info): New.
6809 (x86_linux_regs_info): New.
6810 (x86_arch_setup): Reimplement.
6811 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6812 (x86_emit_ops): Ditto.
6813 (the_low_target): Adjust. Install x86_linux_regs_info,
6814 x86_cannot_fetch_register, and x86_cannot_store_register.
6815 (initialize_low_arch): New.
6816 * linux-ia64-low.c (tdesc_ia64): Declare.
6817 (ia64_fetch_register): Adjust.
6818 (ia64_usrregs_info, regs_info): New globals.
6819 (ia64_regs_info): New function.
6820 (the_low_target): Adjust.
6821 (initialize_low_arch): New function.
6822 * linux-sparc-low.c (tdesc_sparc64): Declare.
6823 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6824 Adjust.
6825 (sparc_arch_setup): New function.
6826 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6827 (the_low_target): Adjust.
6828 (initialize_low_arch): New function.
6829 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6830 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6831 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6832 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6833 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6834 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6835 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6836 (tdesc_powerpc_isa205_vsx64l): Declare.
6837 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6838 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6839 (ppc_set_pc, ppc_get_hwcap): Adjust.
6840 (ppc_usrregs_info): Forward declare.
6841 (!__powerpc64__) ppc_regmap_adjusted: New global.
6842 (ppc_arch_setup): Adjust to the current process'es target
6843 description.
6844 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6845 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6846 (ppc_store_evrregset): Adjust.
6847 (target_regsets): Rename to ...
6848 (ppc_regsets): ... this, and make static.
6849 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6850 (ppc_regs_info): New function.
6851 (the_low_target): Adjust.
6852 (initialize_low_arch): New function.
6853 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6854 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6855 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6856 (tdesc_s390x_linux64v2): Declare.
6857 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6858 (s390_fill_gregset, s390_store_last_break): Adjust.
6859 (target_regsets): Rename to ...
6860 (s390_regsets): ... this, and make static.
6861 (s390_get_pc, s390_set_pc): Adjust.
6862 (s390_get_hwcap): New target_desc parameter, and use it.
6863 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6864 (s390_arch_setup): Adjust to set the current process'es target
6865 description. Don't adjust the regmap.
6866 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6867 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6868 (regs_info_3264): New globals.
6869 (s390_regs_info): New function.
6870 (the_low_target): Adjust.
6871 (initialize_low_arch): New function.
6872 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6873 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6874 [__mips64] (init_registers_mips_linux)
6875 (init_registers_mips_dsp_linux): Delete defines.
6876 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6877 (have_dsp): New global.
6878 (mips_read_description): New, based on mips_arch_setup.
6879 (mips_arch_setup): Reimplement.
6880 (get_usrregs_info): New function.
6881 (mips_cannot_fetch_register, mips_cannot_store_register)
6882 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6883 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6884 (target_regsets): Rename to ...
6885 (mips_regsets): ... this, and make static.
6886 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6887 (dsp_regs_info, regs_info): New globals.
6888 (mips_regs_info): New function.
6889 (the_low_target): Adjust.
6890 (initialize_low_arch): New function.
6891 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6892 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6893 Declare.
6894 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6895 (arm_read_description): New, with bits factored from
6896 arm_arch_setup.
6897 (arm_arch_setup): Reimplement.
6898 (target_regsets): Rename to ...
6899 (arm_regsets): ... this, and make static.
6900 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6901 (arm_regs_info): New function.
6902 (the_low_target): Adjust.
6903 (initialize_low_arch): New function.
6904 * linux-m68k-low.c (tdesc_m68k): Declare.
6905 (target_regsets): Rename to ...
6906 (m68k_regsets): ... this, and make static.
6907 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6908 (m68k_regs_info): New function.
6909 (m68k_arch_setup): New function.
6910 (the_low_target): Adjust.
6911 (initialize_low_arch): New function.
6912 * linux-sh-low.c (tdesc_sharch): Declare.
6913 (target_regsets): Rename to ...
6914 (sh_regsets): ... this, and make static.
6915 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6916 (sh_regs_info, sh_arch_setup): New functions.
6917 (the_low_target): Adjust.
6918 (initialize_low_arch): New function.
6919 * linux-bfin-low.c (tdesc_bfin): Declare.
6920 (bfin_arch_setup): New function.
6921 (bfin_usrregs_info, regs_info): New globals.
6922 (bfin_regs_info): New function.
6923 (the_low_target): Adjust.
6924 (initialize_low_arch): New function.
6925 * linux-cris-low.c (tdesc_cris): Declare.
6926 (cris_arch_setup): New function.
6927 (cris_usrregs_info, regs_info): New globals.
6928 (cris_regs_info): New function.
6929 (the_low_target): Adjust.
6930 (initialize_low_arch): New function.
6931 * linux-cris-low.c (tdesc_crisv32): Declare.
6932 (cris_arch_setup): New function.
6933 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6934 (cris_regs_info): New function.
6935 (the_low_target): Adjust.
6936 (initialize_low_arch): New function.
6937 * linux-m32r-low.c (tdesc_m32r): Declare.
6938 (m32r_arch_setup): New function.
6939 (m32r_usrregs_info, regs_info): New globals.
6940 (m32r_regs_info): Adjust.
6941 (initialize_low_arch): New function.
6942 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6943 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6944 (tic6x_usrregs_info): Forward declare.
6945 (tic6x_read_description): New function, based on ...
6946 (tic6x_arch_setup): ... this. Reimplement.
6947 (target_regsets): Rename to ...
6948 (tic6x_regsets): ... this, and make static.
6949 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6950 (tic6x_regs_info): New function.
6951 (the_low_target): Adjust.
6952 (initialize_low_arch): New function.
6953 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6954 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6955 (target_regsets): Rename to ...
6956 (xtensa_regsets): ... this, and make static.
6957 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6958 globals.
6959 (xtensa_arch_setup, xtensa_regs_info): New functions.
6960 (the_low_target): Adjust.
6961 (initialize_low_arch): New function.
6962 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6963 (nios2_arch_setup): Set the current process'es tdesc.
6964 (target_regsets): Rename to ...
6965 (nios2_regsets): ... this.
6966 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6967 (nios2_regs_info): New function.
6968 (the_low_target): Adjust.
6969 (initialize_low_arch): New function.
6970 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6971 (aarch64_arch_setup): Set the current process'es tdesc.
6972 (target_regsets): Rename to ...
6973 (aarch64_regsets): ... this.
6974 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6975 (aarch64_regs_info): New function.
6976 (the_low_target): Adjust.
6977 (initialize_low_arch): New function.
6978 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6979 globals.
6980 (target_regsets): Rename to ...
6981 (tile_regsets): ... this.
6982 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6983 (tile_regs_info): New function.
6984 (tile_arch_setup): Set the current process'es tdesc.
6985 (the_low_target): Adjust.
6986 (initialize_low_arch): New function.
6987 * spu-low.c (tdesc_spu): Declare.
6988 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6989 * win32-arm-low.c (tdesc_arm): Declare.
6990 (arm_arch_setup): New function.
6991 (the_low_target): Install arm_arch_setup instead of
6992 init_registers_arm.
6993 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6994 (init_windows_x86): Rename to ...
6995 (i386_arch_setup): ... this. Set `win32_tdesc'.
6996 (the_low_target): Adjust.
6997 * win32-low.c (win32_tdesc): New global.
6998 (child_add_thread): Don't create the thread cache here.
6999 (do_initial_child_stuff): Set the new process'es tdesc.
7000 * win32-low.h (struct target_desc): Forward declare.
7001 (win32_tdesc): Declare.
7002 * lynx-i386-low.c (tdesc_i386): Declare global.
7003 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7004 * lynx-low.c (lynx_tdesc): New global.
7005 (lynx_add_process): Set the new process'es tdesc.
7006 * lynx-low.h (struct target_desc): Forward declare.
7007 (lynx_tdesc): Declare global.
7008 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7009 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7010 * nto-low.c (nto_tdesc): New global.
7011 (do_attach): Set the new process'es tdesc.
7012 * nto-low.h (struct target_desc): Forward declare.
7013 (nto_tdesc): Declare.
7014 * nto-x86-low.c (tdesc_i386): Declare.
7015 (nto_x86_arch_setup): Set `nto_tdesc'.
7016
7017 2013-06-04 Gary Benson <gbenson@redhat.com>
7018
7019 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7020 to qSupported response when appropriate.
7021 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7022 with nonzero-length annex.
7023 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7024 arguments supplied in annex.
7025
7026 2013-05-31 Doug Evans <dje@google.com>
7027
7028 PR server/15594
7029 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7030 64 bits in 64-cross-32 environment.
7031
7032 2013-05-28 Pedro Alves <palves@redhat.com>
7033
7034 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7035 (aarch64-without-fpu.c): Delete rule.
7036 * configure.srv (aarch64*-*-linux*): Remove references to
7037 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7038 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7039 declaration.
7040
7041 2013-05-24 Pedro Alves <palves@redhat.com>
7042
7043 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7044 instead of strchr/decode_address. Error if the range isn't split
7045 with a ','. Don't assume there's be a ':' in the action.
7046
7047 2013-05-23 Yao Qi <yao@codesourcery.com>
7048 Pedro Alves <palves@redhat.com>
7049
7050 * linux-low.c (lwp_in_step_range): New function.
7051 (linux_wait_1): If the thread was range stepping and stopped
7052 outside the stepping range, report the stop to GDB. Otherwise,
7053 continue stepping. Add range stepping debug output.
7054 (linux_set_resume_request): Copy the step range from the resume
7055 request to the lwp.
7056 (linux_supports_range_stepping): New.
7057 (linux_target_ops) <supports_range_stepping>: Set to
7058 linux_supports_range_stepping.
7059 * linux-low.h (struct linux_target_ops)
7060 <supports_range_stepping>: New field.
7061 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7062 * linux-x86-low.c (x86_supports_range_stepping): New.
7063 (the_low_target) <supports_range_stepping>: Set to
7064 x86_supports_range_stepping.
7065 * server.c (handle_v_cont): Handle 'r' action.
7066 (handle_v_requests): Append ";r" if the target supports range
7067 stepping.
7068 * target.h (struct thread_resume) <step_range_start,
7069 step_range_end>: New fields.
7070 (struct target_ops) <supports_range_stepping>:
7071 New field.
7072 (target_supports_range_stepping): New macro.
7073
7074 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7075
7076 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7077 confusion in comment.
7078
7079 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7080
7081 * lynx-low.c (struct process_info_private): New type.
7082 (lynx_add_process): New function.
7083 (lynx_create_inferior, lynx_attach): Replace calls to
7084 add_process by calls to lynx_add_process.
7085 (lynx_resume): If PTID is null, then try using
7086 current_process()->private->last_wait_event_ptid.
7087 Add comments.
7088 (lynx_clear_inferiors): Delete. The contents of that function
7089 has been inlined in lynx_mourn;
7090 (lynx_wait_1): Save the ptid in the process's private data.
7091 (lynx_mourn): Free the process' private data. Replace call
7092 to lynx_clear_inferiors by call to clear_inferiors.
7093
7094 2013-05-17 Yao Qi <yao@codesourcery.com>
7095
7096 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7097 the right place.
7098
7099 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7100
7101 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7102 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7103 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7104 PT_TEXT_END_ADDR guards. Update comments.
7105 (linux_target_op) <read_offsets>: Conditionally define to
7106 linux_read_offsets if the target is UCLIBC and if it defines
7107 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7108
7109 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7110 Andrew Jenner <andrew@codesourcery.com>
7111
7112 * Makefile.in (SFILES): Add linux-nios2-low.c.
7113 (clean): Add action to delete nios2-linux.c.
7114 (nios2-linux.c): New rule.
7115 * configure.srv: Add nios2*-*-linux*.
7116 * linux-nios2-low.c: New.
7117
7118 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7119
7120 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7121
7122 2013-04-25 Hui Zhu <hui@codesourcery.com>
7123
7124 PR gdb/15186
7125 * ax.c (ax_printf): Add fflush.
7126
7127 2013-04-22 Tom Tromey <tromey@redhat.com>
7128
7129 * Makefile.in (SFILES): Add filestuff.c.
7130 (OBS): Add filestuff.o.
7131 (filestuff.o): New target.
7132 * config.in, configure: Rebuild.
7133 * configure.ac: Check for fdwalk, pipe2.
7134
7135 2013-04-17 Pedro Alves <palves@redhat.com>
7136
7137 * configure.ac (USE_THREAD_DB): Delete variable.
7138 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7139 Don't AC_SUBST USE_THREAD_DB.
7140 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7141 * config.in, configure: Regenerate.
7142
7143 2013-04-16 Pedro Alves <palves@redhat.com>
7144
7145 * linux-low.h (struct lwp_info) <thread_known>: Move under
7146 the USE_THREAD_DB #ifdef.
7147
7148 2013-04-16 Pedro Alves <palves@redhat.com>
7149
7150 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7151 (linux-low.o): Delete rule.
7152 * linux-low.h: Always include "gdb_thread_db.h" instead of
7153 conditionally including thread_db.h.
7154 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7155 HAVE_THREAD_DB_H.
7156
7157 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7158
7159 * Makefile.in (install-only): Fix make install regression.
7160
7161 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7162
7163 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7164 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7165 installation.
7166 * gdbserver.1: Remove.
7167
7168 2013-03-22 Pedro Alves <palves@redhat.com>
7169
7170 * linux-low.c (handle_extended_wait): Don't call
7171 linux_enable_event_reporting.
7172
7173 2013-03-15 Tony Theodore <tonyt@logyst.com>
7174
7175 PR build/9098:
7176 * Makefile.in (SHELL): Use @SHELL@.
7177
7178 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7179
7180 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7181 compiler warning.
7182
7183 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7184
7185 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7186 Remove extraneous NULL element.
7187
7188 2013-03-13 Yao Qi <yao@codesourcery.com>
7189
7190 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7191 'V' block in trace frame.
7192
7193 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7194
7195 * target.h (struct target_ops): Add btrace ops.
7196 (target_supports_btrace): New macro.
7197 (target_enable_btrace): New macro.
7198 (target_disable_btrace): New macro.
7199 (target_read_btrace): New macro.
7200 * gdbthread.h (struct thread_info): Add btrace field.
7201 * server.c: Include btrace-common.h.
7202 (handle_btrace_general_set): New function.
7203 (handle_btrace_enable): New function.
7204 (handle_btrace_disable): New function.
7205 (handle_general_set): Call handle_btrace_general_set.
7206 (handle_qxfer_btrace): New function.
7207 (struct qxfer qxfer_packets[]): Add btrace entry.
7208 * inferiors.c (remove_thread): Disable btrace.
7209 * linux-low: Include linux-btrace.h.
7210 (linux_low_enable_btrace): New function.
7211 (linux_low_read_btrace): New function.
7212 (linux_target_ops): Add btrace ops.
7213 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7214 Add srv_linux_btrace=yes.
7215 (x86_64-*-linux*): Add linux-btrace.o.
7216 Add srv_linux_btrace=yes.
7217 * configure.ac: Define HAVE_LINUX_BTRACE.
7218 * config.in: Regenerated.
7219 * configure: Regenerated.
7220
7221 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7222
7223 * server.c (handle_qxfer): Preserve error message if -3 is
7224 returned.
7225 (qxfer): Document the -3 return value.
7226
7227 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7228
7229 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7230 (linux_btrace_h): New variable.
7231 (linux-btrace.o): New rule.
7232
7233 2013-03-08 Stan Shebs <stan@codesourcery.com>
7234 Hafiz Abid Qadeer <abidh@codesourcery.com>
7235
7236 * tracepoint.c (trace_buffer_size): New global.
7237 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7238 (init_trace_buffer): Change to one-argument function. Allocate
7239 trace buffer memory.
7240 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7241 handle QTBuffer:size packet.
7242 (cmd_bigqtbuffer_size): New function.
7243 (initialize_tracepoint): Call init_trace_buffer with
7244 DEFAULT_TRACE_BUFFER_SIZE.
7245 * server.c (handle_query): Add QTBuffer:size in the
7246 supported packets.
7247
7248 2013-03-07 Yao Qi <yao@codesourcery.com>
7249
7250 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7251 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7252 of -1.
7253 (cmd_qtsp): Adjust condition. Do post increment.
7254 Set cur_action and cur_step_action back to 0.
7255
7256 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7257
7258 PR server/15236
7259 * linux-low.c (linux_write_memory): Return early success if LEN is
7260 zero.
7261
7262 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7263
7264 * configure.srv: Add x86_64-*-cygwin* as target.
7265
7266 2013-02-28 Tom Tromey <tromey@redhat.com>
7267
7268 * configure.ac: Invoke AC_SYS_LARGEFILE.
7269 * configure, config.in: Rebuild.
7270
7271 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7272
7273 * win32-low.c: Throughout, fix format strings and casts of
7274 printf-like functions to avoid type related warnings on all
7275 platforms.
7276 (get_child_debug_event): Print dwDebugEventCode as hex since
7277 that's how it's usually documented.
7278
7279 2013-02-28 Yao Qi <yao@codesourcery.com>
7280
7281 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7282 pulongest.
7283
7284 2013-02-27 Jiong Wang <jiwang@tilera.com>
7285
7286 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7287 (reg-tilegx32.c): New rule.
7288 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7289 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7290 different register info initializer according to elf class.
7291 (init_registers_tilgx32): New function. The tilegx32 register info
7292 initializer.
7293 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7294 (tile_store_gregset): Likewise.
7295
7296 2013-02-27 Yao Qi <yao@codesourcery.com>
7297
7298 * server.c (process_point_options): Print debug message when
7299 debug_threads is true.
7300
7301 2013-02-26 Yao Qi <yao@codesourcery.com>
7302
7303 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7304
7305 2013-02-19 Pedro Alves <palves@redhat.com>
7306 Kai Tietz <ktietz@redhat.com>
7307
7308 PR gdb/15161
7309
7310 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7311 instead of strtoul to extract address from packet.
7312 (process_serial_event) <'z'>: Likewise.
7313
7314 2013-02-18 Yao Qi <yao@codesourcery.com>
7315
7316 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7317
7318 2013-02-14 Pedro Alves <palves@redhat.com>
7319
7320 Plug memory leak.
7321
7322 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7323 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7324
7325 2013-02-14 Pedro Alves <palves@redhat.com>
7326
7327 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7328
7329 2013-02-14 Pedro Alves <palves@redhat.com>
7330
7331 * tracepoint.c (save_string): Delete.
7332 (add_tracepoint_action): Use savestring instead of save_string.
7333
7334 2013-02-12 Pedro Alves <palves@redhat.com>
7335
7336 * linux-xtensa-low.c: Ditto.
7337 * xtensa-xtregs.c: Ditto.
7338
7339 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7340
7341 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7342 thread_db.
7343
7344 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7345
7346 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7347 aarch64_num_wp_regs and aarch64_num_bp_regs to
7348 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7349
7350 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7351
7352 * linux-aarch64-low.c (ps_get_thread_area): Replace
7353 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7354
7355 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7356 Marcus Shawcroft <marcus.shawcroft@arm.com>
7357 Nigel Stephens <nigel.stephens@arm.com>
7358 Yufeng Zhang <yufeng.zhang@arm.com>
7359
7360 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7361 (aarch64.c, aarch64-without-fpu.c): New targets.
7362 * configure.srv (aarch64*-*-linux*): New.
7363 * linux-aarch64-low.c: New file.
7364
7365 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7366
7367 * linux-low.c (handle_extended_wait, linux_create_inferior)
7368 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7369 (dequeue_one_deferred_signal, linux_resume_one_thread)
7370 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7371 (linux_tracefork_grandchild, linux_test_for_tracefork)
7372 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7373 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7374 where the argument is 0.
7375
7376 2013-01-25 Yao Qi <yao@codesourcery.com>
7377
7378 * event-loop.c: Include "queue.h".
7379 (gdb_event_p): New typedef.
7380 (struct gdb_event) <next_event>: Remove.
7381 (event_queue): Change to QUEUE(gdb_event_p).
7382 (async_queue_event): Remove.
7383 (gdb_event_xfree): New.
7384 (initialize_event_loop): New.
7385 (process_event): Use API from QUEUE.
7386 (wait_for_event): Likewise.
7387 * server.c (main): Call initialize_event_loop.
7388 * server.h (initialize_event_loop): Declare.
7389
7390 2013-01-18 Yao Qi <yao@codesourcery.com>
7391
7392 * ax.h (struct eval_agent_expr_context): New.
7393 (gdb_eval_agent_expr): Update declaration.
7394 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7395 TFRAME. Add new argument CTX.
7396 * server.h (struct eval_agent_expr_context): Declare.
7397 (agent_mem_read, agent_tsv_read): Update declaration.
7398 (agent_mem_read_string): Likewise.
7399 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7400 (add_traceframe_block): Add new argument TPOINT.
7401 Increase TPOINT->traceframe_usage.
7402 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7403 eval_tracepoint_agent_expr.
7404 (condition_true_at_tracepoint): Likewise.
7405 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7406 (agent_mem_read_string, agent_tsv_read): Likewise.
7407
7408 2013-01-16 Yao Qi <yao@codesourcery.com>
7409
7410 * linux-low.c (linux_resume_one_lwp): Don't check
7411 'lwp->bp_reinsert != 0'.
7412
7413 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7414 Pedro Alves <palves@redhat.com>
7415
7416 * lynx-low.c (ptrace_request_to_str): Define a temporary
7417 macro and use it to simplify this function's implementation.
7418
7419 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7420
7421 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7422 sets errno.
7423
7424 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7425
7426 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7427
7428 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7429
7430 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7431
7432 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7433
7434 * lynx-low.c (lynx_resume): Use the resume_info parameter
7435 to determine the ptid for the lynx_ptrace call, unless
7436 it is equal to minus_one_ptid, in which case we use the
7437 ptid of the current_inferior.
7438 (lynx_wait_1): After having received a thread create/exit
7439 event, resume the inferior's execution using the signaling
7440 thread's ptid, rather than the old ptid.
7441
7442 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7443
7444 * lynx-low.c (lynx_resume): Delete variable ret.
7445
7446 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7447
7448 * gdbreplay.c (gdbreplay_version): Update copyright year.
7449 * server.c (gdbserver_version): Likewise.
7450
7451 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7452
7453 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7454 new thread.
7455
7456 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7457
7458 * lynx-low.c (ptrace_request_to_str): Add handling for
7459 PTRACE_GETTRACESIG.
7460
7461 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7462
7463 * lynx-low.c (lynx_attach): Delete variable new_process.
7464
7465 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7466
7467 * lynx-low.c (lynx_create_inferior): Delete variable
7468 new_process.
7469
7470 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7471
7472 * lynx-low.c (ptrace_request_to_str): Do not handle
7473 PTRACE_GETTHREADLIST if this macro does not exist.
7474
7475 2012-12-15 Yao Qi <yao@codesourcery.com>
7476
7477 * Makefile.in (OBS): Add notif.o.
7478 * notif.c, notif.h: New.
7479 * server.c: Include "notif.h".
7480 (struct vstop_notif) <next>: Remove.
7481 <base>: New field.
7482 (queue_stop_reply): Update.
7483 (push_event, send_next_stop_reply): Remove.
7484 (discard_queued_stop_replies): Update.
7485 (notif_stop): New variable.
7486 (handle_v_stopped): Remove.
7487 (handle_v_requests): Don't call handle_v_stopped. Call
7488 handle_ack_notif instead.
7489 (queue_stop_reply_callback): Call notif_event_enque instead
7490 of queue_stop_reply.
7491 (handle_status): Don't call send_next_stop_reply, call
7492 notif_write_event instead.
7493 (kill_inferior_callback): Likewise.
7494 (detach_or_kill_inferior_callback): Likewise.
7495 (main): Call initialize_notif.
7496 (process_serial_event): Call QUEUE_is_empty.
7497 (handle_target_event): Call notif_push instead of push event.
7498 * server.h (push_event): Remove declaration.
7499
7500 2012-12-10 Tom Tromey <tromey@redhat.com>
7501
7502 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7503 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7504 macros.
7505 (.c.o): Rewrite.
7506 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7507 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7508 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7509 (amd64-linux-ipa.o, ax.o): Rewrite.
7510 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7511 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7512 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7513 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7514 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7515 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7516 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7517 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7518 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7519 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7520 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7521 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7522 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7523 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7524 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7525 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7526 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7527 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7528 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7529 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7530 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7531 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7532 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7533 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7534 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7535 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7536 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7537 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7538 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7539 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7540 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7541 (reg-tilegx.o): Remove.
7542 (all_object_files): New macro.
7543 Include .deps files.
7544 * aclocal.m4, configure: Rebuild.
7545 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7546 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7547 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7548
7549 2012-12-05 Tom Tromey <tromey@redhat.com>
7550
7551 PR gdb/14917:
7552 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7553
7554 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7555
7556 * configure.ac: Check for linux/perf_event.h.
7557 * config.in: Regenerated.
7558 * configure: Regenerated.
7559
7560 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7561
7562 * hostio.c (handle_readlink): Decrease buffer size
7563 parameter passed to readlink by one byte.
7564
7565 2012-11-26 Yao Qi <yao@codesourcery.com>
7566
7567 * configure.ac (build_warnings): Append '-Wempty-body'.
7568 * configure: Regenerated.
7569 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7570 body.
7571
7572 2012-11-15 Pierre Muller <muller@sourceware.org>
7573
7574 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7575 * config.in: Regenerate.
7576 * configure: Regenerate.
7577 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7578 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7579 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7580 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7581 header.
7582 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7583 instead of <sys/wait.h> header.
7584 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7585
7586 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7587
7588 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7589 (various make rules): Remove -DGDBSERVER
7590
7591 2012-11-09 Yao Qi <yao@codesourcery.com>
7592
7593 * spu-low.c (current_ptid): Move it to ..
7594 * gdbthread.h: ... here. New.
7595 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7596 * server.c (myresume, process_serial_event): Likewise.
7597 * thread-db.c (thread_db_find_new_threads): Likewise.
7598 * tracepoint.c (run_inferior_command): Likewise.
7599
7600 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7601
7602 * server.c (handle_search_memory_1): Include access length in
7603 warning message.
7604
7605 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7606
7607 * linux-crisv32-low.c: Fix compile errors.
7608
7609 2012-09-04 Yao Qi <yao@codesourcery.com>
7610
7611 * tracepoint.c (cmd_qtsv): Adjust debug message.
7612 Don't check CUR_TPOINT.
7613
7614 2012-08-28 Yao Qi <yao@codesourcery.com>
7615
7616 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7617 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7618 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7619 Remove declarations of xmalloc, xreallloc, xstrdup and
7620 freeargv.
7621 * Makefile.in (libiberty_h): New.
7622 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7623 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7624
7625 2012-08-23 Yao Qi <yao@codesourcery.com>
7626
7627 * server.h: Remove declaration of 'xsnprintf'.
7628
7629 2012-08-22 Keith Seitz <keiths@redhat.com>
7630
7631 * server.h: Include build-gnulib-gbserver/config.h.
7632 * gdbreplay.c: Likewise.
7633
7634 2012-08-08 Doug Evans <dje@google.com>
7635
7636 * Makefile.in (SFILES): Add gdb_vecs.c.
7637 (OBS): Add gdb_vecs.o.
7638 (gdb_vecs_h, host_defs_h): New variables.
7639 (thread-db.o): Add $(gdb_vecs_h) dependency.
7640 (gdb_vecs.o): New rule.
7641 * thread-db.c: #include "gdb_vecs.h".
7642 (thread_db_load_search): Use a vector to iterate over path elements.
7643 Handle text appearing after "$pdir".
7644
7645 * configure.ac: Add check for strstr.
7646 * config.in: Regenerate.
7647 * configure: Regenerate.
7648
7649 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7650
7651 * hostio.c (handle_pread): If pread fails, fall back to attempting
7652 lseek/read.
7653 (handle_pwrite): Likewise for pwrite.
7654
7655 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7656
7657 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7658 between unsupported TYPE and unimplementable ADDR/LEN combination.
7659 (arm_insert_point): Act on new return value.
7660
7661 2012-07-31 Pedro Alves <palves@redhat.com>
7662
7663 * server.c (process_point_options): Only skip tokens if we find
7664 one that is unrecognized. Don't treat 'X' specially while
7665 skipping unrecognized tokens.
7666
7667 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7668
7669 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7670 to 4-byte-align HW breakpoint addresses for Thumb.
7671
7672 2012-07-27 Yao Qi <yao@codesourcery.com>
7673
7674 PR remote/14161.
7675
7676 * server.h: Declare gdb_agent_about_to_close.
7677 * target.c (kill_inferior): Include "agent.h".
7678 New. Send command 'kill'.
7679 * target.h (kill_inferior): Removed macro.
7680 * tracepoint.c (gdb_agent_about_to_close): New.
7681 (gdb_agent_helper_thread): Handle command 'close'.
7682 Wait endlessly until the inferior stops.
7683 Install gdb_agent_remove_socket to atexit hook.
7684 (agent_socket_name): New static variable.
7685 (gdb_agent_socket_init): Replace local variable 'name' with
7686 'agent_socket_name'.
7687 (gdb_agent_remove_socket): New.
7688
7689 2012-07-27 Yao Qi <yao@codesourcery.com>
7690
7691 * server.c (process_point_options): Stop at 'X' when parsing.
7692
7693 2012-07-19 Michael Eager <eager@eagercon.com>
7694
7695 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7696 to hw_execute.
7697 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7698 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7699 hardware breakpoint.
7700
7701 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7702
7703 * gdbserver/linux-low.c (initialize_low): Call
7704 linux_ptrace_init_warnings.
7705
7706 2012-07-02 Doug Evans <dje@google.com>
7707
7708 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7709 pointer to int.
7710
7711 2012-07-02 Stan Shebs <stan@codesourcery.com>
7712
7713 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7714 (ax.o): Add it to build rule.
7715 (ax-ipa.o): Ditto.
7716 (OBS): Add format.o.
7717 (IPA_OBS): Add format.o.
7718 * server.c (handle_query): Claim support for breakpoint commands.
7719 (process_point_options): Add command case.
7720 (process_serial_event): Leave running if there are printfs in
7721 effect.
7722 * mem-break.h (any_persistent_commands): Declare.
7723 (add_breakpoint_commands): Declare.
7724 (gdb_no_commands_at_breakpoint): Declare.
7725 (run_breakpoint_commands): Declare.
7726 * mem-break.c (struct point_command_list): New struct.
7727 (struct breakpoint): New field command_list.
7728 (any_persistent_commands): New function.
7729 (add_commands_to_breakpoint): New function.
7730 (add_breakpoint_commands): New function.
7731 (gdb_no_commands_at_breakpoint): New function.
7732 (run_breakpoint_commands): New function.
7733 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7734 locally.
7735 * ax.c: Include format.h.
7736 (ax_printf): New function.
7737 (gdb_eval_agent_expr): Add printf opcode.
7738
7739 2012-06-13 Yao Qi <yao@codesourcery.com>
7740
7741 * server.c (start_inferior): Remove duplicated writes to fields
7742 'last_resume_kind' and 'last_status' of 'current_inferior'.
7743
7744 2012-06-12 Yao Qi <yao@codesourcery.com>
7745 Pedro Alves <palves@redhat.com>
7746
7747 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7748 comment.
7749 * server.c (handle_v_cont): Extend comment.
7750
7751 2012-06-11 Yao Qi <yao@codesourcery.com>
7752
7753 * linux-low.c (linux_attach): Add 'static'.
7754
7755 2012-06-06 Yao Qi <yao@codesourcery.com>
7756
7757 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7758
7759 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7760
7761 Fix gcc -flto compilation warning.
7762 * server.c (main): Make variable multi_mode and attach volatile.
7763
7764 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7765
7766 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7767 if the platform doesn't know about it.
7768
7769 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7770
7771 * Makefile.in (SFILES): Add linux-tile-low.c.
7772 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7773 * configure.srv: Handle tilegx-*-linux*.
7774 * linux-tile-low.c: New file.
7775
7776 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7777
7778 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7779
7780 2012-05-24 Pedro Alves <palves@redhat.com>
7781
7782 PR gdb/7205
7783
7784 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7785
7786 2012-05-24 Pedro Alves <palves@redhat.com>
7787
7788 PR gdb/7205
7789
7790 Replace target_signal with gdb_signal throughout.
7791
7792 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7793
7794 * linux-low.c (linux_store_registers): Avoid the copying sequence
7795 when no data has been retrieved by ptrace.
7796
7797 2012-05-22 Will Deacon <will.deacon@arm.com>
7798
7799 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7800 Include asm/ptrace.h.
7801 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7802 already defined.
7803
7804 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7805
7806 * linux-low.c (linux_store_registers): Don't re-retrieve data
7807 with ptrace that has already been obtained from /proc. Always
7808 copy any data retrieved with ptrace to the buffer supplied.
7809
7810 2012-05-11 Yao Qi <yao@codesourcery.com>
7811 Pedro Alves <palves@redhat.com>
7812
7813 * linux-low.c (enum stopping_threads_kind): New.
7814 (stopping_threads): Change type to `enum stopping_threads_kind'.
7815 (handle_extended_wait): If stopping and suspending threads, leave
7816 the new_lwp suspended too.
7817 (linux_wait_for_event): Adjust.
7818 (stop_all_lwps): Set `stopping_threads' to
7819 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7820 whether we're suspending threads or just stopping them. Assert no
7821 recursion happens.
7822
7823 2012-04-29 Yao Qi <yao@codesourcery.com>
7824
7825 * server.h: Move some code to ...
7826 * gdbthread.h: ... here. New.
7827 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7828 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7829 (nto-low.o, win32-low.o): Likewise.
7830 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7831 * regcache.c, remote-utils.c, server.c: Likewise.
7832 * target.c, tracepoint.c, win32-low.c: Likewise.
7833
7834 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7835
7836 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7837 (PTRACE_ARG4_TYPE): Likewise.
7838 (PTRACE_XFER_TYPE): Likewise.
7839 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7840 ptrace to PTRACE_ARG3_TYPE.
7841 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7842 (PTRACE_ARG4_TYPE): Likewise.
7843 (PTRACE_XFER_TYPE): Likewise.
7844 (linux_detach_one_lwp): Cast fourth argument of
7845 ptrace to long then PTRACE_ARG4_TYPE.
7846 (regsets_fetch_inferior_registers): Cast third argument of
7847 ptrace to long then PTRACE_ARG3_TYPE.
7848 (regsets_store_inferior_registers): Likewise.
7849
7850 2012-04-20 Pedro Alves <palves@redhat.com>
7851
7852 * configure: Regenerate.
7853
7854 2012-04-19 Pedro Alves <palves@redhat.com>
7855
7856 * Makefile.in (GNULIB_BUILDDIR): New.
7857 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7858 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7859 (all, install-only, uninstall, clean-info, all-lib, clean): No
7860 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7861 (maintainer-clean realclean distclean): Use subdir_do.
7862 (subdir_do): New.
7863 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7864 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7865 * acinclude.m4: Include acx_configure_dir.m4.
7866 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7867 calls. Call AC_PROG_RANLIB. Configure gnulib using
7868 ACX_CONFIGURE_DIR.
7869 (GNULIB): New.
7870 (GNULIB_STDINT_H): Adjust.
7871 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7872 * gdbreplay.c: Include build-gnulib/config.h.
7873 * server.h: Likewise.
7874 * aclocal.m4: Regenerate.
7875 * config.in: Regenerate.
7876 * configure: Regenerate.
7877
7878 2012-04-19 Pedro Alves <palves@redhat.com>
7879
7880 * Makefile.in (LIBGNU, INCGNU): Adjust.
7881 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7882 (all, install-only, uninstall, clean-info, all-lib, clean)
7883 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7884 * configure.ac: Adjust AC_OUTPUT output.
7885 * aclocal.m4: Regenerate.
7886 * configure: Regenerate.
7887
7888 2012-04-19 Pedro Alves <palves@redhat.com>
7889
7890 * Makefile.in (generated_files): New.
7891 (server_h): Remove the explicit dependency on config.h, and depend
7892 on $generated_files.
7893
7894 2012-04-19 Pedro Alves <palves@redhat.com>
7895
7896 * Makefile.in (INCGNU): Add -Ignulib.
7897
7898 2012-04-19 Pedro Alves <palves@redhat.com>
7899
7900 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7901 (INCGNU): ... this, and spell out -I here.
7902 (GNULIB_LIB): Rename to ...
7903 (LIBGNU): ... this.
7904 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7905
7906 2012-04-19 Pedro Alves <palves@redhat.com>
7907
7908 * config.in: Regenerate.
7909
7910 2012-04-19 Pedro Alves <palves@redhat.com>
7911
7912 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7913 * server.h (memmem): Remove declaration.
7914 * config.in: Regenerate.
7915 * configure: Regenerate.
7916
7917 2012-04-19 Yao Qi <yao@codesourcery.com>
7918
7919 * Makefile.in (SFILES): Add common/vec.c.
7920 (OBS): Add vec.o.
7921 (vec.o): New rule.
7922
7923 2012-04-19 Yao Qi <yao@codesourcery.com>
7924
7925 * remote-utils.c (prepare_resume_reply): Replace with macro
7926 target_core_of_thread.
7927 * server.c (handle_qxfer_threads_proper): Likewise.
7928 * target.h (traget_core_of_thread): New macro.
7929
7930 2012-04-18 Pedro Alves <palves@redhat.com>
7931
7932 * aclocal.m4: Regenerate.
7933 * configure: Regenerate.
7934
7935 2012-04-16 Yao Qi <yao@codesourcery.com>
7936
7937 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7938 duplicated on address.
7939
7940 2012-04-16 Yao Qi <yao@codesourcery.com>
7941
7942 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7943 (struct tracepoint_action_ops) <send>: New field.
7944 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7945 (agent_expr_send, x_tracepoint_action_send): New.
7946 (l_tracepoint_action_send): New.
7947 (cmd_qtdp): Download and install tracepoint
7948 according to `use_agent'.
7949 (run_inferior_command): Add one more parameter `len'.
7950 Update callers.
7951 (tracepoint_send_agent): New.
7952 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7953
7954 2012-04-16 Yao Qi <yao@codesourcery.com>
7955
7956 * tracepoint.c (download_tracepoints): Moved to ...
7957 (cmd_qtstart): ... here.
7958
7959 2012-04-14 Yao Qi <yao@codesourcery.com>
7960
7961 * tracepoint.c: Include inttypes.h.
7962 (struct collect_memory_action): Use sized types.
7963 (struct tracepoint): Likewise.
7964 (cmd_qtdp, stop_tracing): Update print specifiers.
7965 (cmd_qtp, response_tracepoint): Likewise.
7966 (collect_data_at_tracepoint): Likewise.
7967 (collect_data_at_step): Likewise.
7968
7969 2012-04-14 Yao Qi <yao@codesourcery.com>
7970
7971 Import gnulib module inttypes.
7972 * aclocal.m4, config.in, configure: Regenerated.
7973
7974 2012-04-14 Yao Qi <yao@codesourcery.com>
7975
7976 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7977 Makefile and config.status at last.
7978
7979 2012-04-13 Yao Qi <yao@codesourcery.com>
7980
7981 * tracepoint.c: Include stdint.h unconditionally.
7982
7983 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7984
7985 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7986 on BFD_HAVE_SYS_PROCFS_TYPE.
7987 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7988 * configure: Regenerate.
7989 * config.in: Likewise.
7990
7991 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7992
7993 * Makefile.in (clean): Also remove x32.c x32-linux.c
7994 x32-avx.c x32-avx-linux.c.
7995 (x32.o): New target.
7996 (x32.c): Likewise.
7997 (x32-linux.o): Likewise.
7998 (x32-linux.c): Likewise.
7999 (x32-avx.o): Likewise.
8000 (x32-avx.c): Likewise.
8001 (x32-avx-linux.o): Likewise.
8002 (x32-avx-linux.c): Likewise.
8003
8004 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8005 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8006 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8007 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8008 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8009 i386/x32-avx-linux.xml.
8010
8011 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8012 (init_registers_x32_avx_linux): Likwise.
8013 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8014 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8015
8016 2012-04-13 Pedro Alves <palves@redhat.com>
8017
8018 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8019 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8020 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8021 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8022 the sub-make.
8023
8024 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8025
8026 * linux-x86-low.c (compat_x32_clock_t): New.
8027 (compat_x32_siginfo_t): Likewise.
8028 (compat_x32_siginfo_from_siginfo): Likewise.
8029 (siginfo_from_compat_x32_siginfo): Likewise.
8030 (linux_is_elf64): Likewise.
8031 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8032 and siginfo_from_compat_x32_siginfo for x32.
8033 (x86_arch_setup): Set linux_is_elf64.
8034
8035 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8036
8037 PR gdb/13969
8038 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8039 e_machine field.
8040 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8041 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8042 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8043 compatible with process.
8044
8045 2012-04-12 Yao Qi <yao@codesourcery.com>
8046
8047 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8048 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8049 (install-only, install-info, clean): Handle sub dir gnulib.
8050 (all-lib, am--refresh): New targets.
8051 (memmem.o): Remove target.
8052 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8053 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8054 (AC_REPLACE_FUNCS): Remove memmem.
8055 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8056 (AC_OUTPUT): Generate Makefile in gnulib/.
8057 * aclocal.m4, config.in, configure: Regenerated.
8058
8059 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8060
8061 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8062
8063 2012-04-05 Pedro Alves <palves@redhat.com>
8064
8065 -Werror=strict-aliasing
8066
8067 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8068 pointer.
8069
8070 2012-04-04 Pedro Alves <palves@redhat.com>
8071
8072 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8073 (sparc_store_gregset_from_stack, sparc_store_gregset)
8074 (sparc_breakpoint_at): Fix formatting.
8075
8076 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8077
8078 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8079 are available.
8080 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8081 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8082 * config.in: Regenerate.
8083 * configure: Likewise.
8084
8085 2012-03-29 Pedro Alves <palves@redhat.com>
8086
8087 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8088 Correct ptrace arguments.
8089
8090 2012-03-28 Pedro Alves <palves@redhat.com>
8091
8092 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8093 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8094 (IA64_FR1_REGNUM): New defines.
8095 (ia64_fetch_register): New.
8096 (the_low_target): Install it.
8097 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8098 field.
8099 * linux-low.c (linux_fetch_registers): Try the
8100 the_low_target.fetch_register hook first.
8101
8102 * linux-arm-low.c (the_low_target): Adjust.
8103 * linux-bfin-low.c (the_low_target): Adjust.
8104 * linux-cris-low.c (the_low_target): Adjust.
8105 * linux-crisv32-low.c (the_low_target): Adjust.
8106 * linux-m32r-low.c (the_low_target): Adjust.
8107 * linux-m68k-low.c (the_low_target): Adjust.
8108 * linux-mips-low.c (the_low_target): Adjust.
8109 * linux-ppc-low.c (the_low_target): Adjust.
8110 * linux-s390-low.c (the_low_target): Adjust.
8111 * linux-sh-low.c (the_low_target): Adjust.
8112 * linux-sparc-low.c (the_low_target): Adjust.
8113 * linux-tic6x-low.c (the_low_target): Adjust.
8114 * linux-x86-low.c (the_low_target): Adjust.
8115 * linux-xtensa-low.c (the_low_target): Adjust.
8116
8117 2012-03-26 Pedro Alves <palves@redhat.com>
8118
8119 * server.c (handle_qxfer_libraries): Don't bail early if
8120 the_target->qxfer_libraries_svr4 is not NULL.
8121
8122 2012-03-26 Pedro Alves <palves@redhat.com>
8123
8124 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8125
8126 2012-03-23 Pedro Alves <palves@redhat.com>
8127
8128 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8129 "library-list-svr4" element's start tag when the the DSO list is
8130 empty.
8131
8132 2012-03-23 Pedro Alves <palves@redhat.com>
8133
8134 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8135 a variable whose type size is the same as the inferior's pointer
8136 size.
8137
8138 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8139
8140 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8141 struct siginfo.
8142 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8143 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8144 * linux-low.h: Include <signal.h>.
8145 (struct siginfo): Remove forward declaration.
8146 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8147 struct siginfo.
8148
8149 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8150
8151 * .gitignore: Ignore more files.
8152
8153 2012-03-19 Pedro Alves <palves@redhat.com>
8154 Jan Kratochvil <jan.kratochvil@redhat.com>
8155
8156 * server.c (cont_thread, general_thread): Add describing comments.
8157 (start_inferior): Clear `cont_thread'.
8158 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8159 of a process.
8160
8161 2012-03-15 Yao Qi <yao@codesourcery.com>
8162
8163 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8164 handling to ...
8165 (cmd_qtdp): ... here.
8166
8167 2012-03-15 Yao Qi <yao@codesourcery.com>
8168
8169 * tracepoint.c (struct tracepoint_action_ops): New.
8170 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8171 (m_tracepoint_action_download): New.
8172 (r_tracepoint_action_download): New.
8173 (x_tracepoint_action_download): New.
8174 (l_tracepoint_action_download): New.
8175 (add_tracepoint_action): Install `action->ops' according type.
8176 (download_tracepoint_1): Move code `download' function pointer
8177 of various tracepoint_action_ops.
8178
8179 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8180
8181 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8182 linux_ptrace_attach_warnings.
8183
8184 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8185
8186 * Makefile.in (linux-ptrace.o): New.
8187 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8188 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8189 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8190 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8191 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8192 of these targets.
8193 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8194
8195 2012-03-08 Yao Qi <yao@codesourcery.com>
8196 Pedro Alves <palves@redhat.com>
8197
8198 Fix PR server/13392.
8199 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8200 offset of JMP insn.
8201 * tracepoint.c (remove_tracepoint): New.
8202 (cmd_qtdp): Call remove_tracepoint when failed to install.
8203
8204 2012-03-07 Pedro Alves <palves@redhat.com>
8205
8206 * linux-low.c (get_detach_signal): New.
8207 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8208 Pass on pending signals to PTRACE_DETACH. Check the result of the
8209 ptrace call.
8210 * server.c (program_signals, program_signals_p): New.
8211 (handle_general_set): Handle QProgramSignals.
8212 * server.h (program_signals, program_signals_p): Declare.
8213
8214 2012-03-05 Pedro Alves <palves@redhat.com>
8215 Jan Kratochvil <jan.kratochvil@redhat.com>
8216
8217 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8218 New comment why.
8219
8220 2012-03-03 Yao Qi <yao@codesourcery.com>
8221
8222 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8223 agent_look_up_symbols.
8224
8225 2012-03-03 Yao Qi <yao@codesourcery.com>
8226
8227 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8228 (linux-x86-low.o): Likewise.
8229 * server.h: Remove in_process_agent_loaded.
8230 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8231 common/agent.c.
8232 Update callers.
8233
8234 2012-03-03 Yao Qi <yao@codesourcery.com>
8235
8236 * tracepoint.c (gdb_agent_capability): New global.
8237 (in_process_agent_loaded_ust): Renamed to
8238 `in_process_agent_supports_ust'.
8239 Update callers.
8240 (in_process_agent_supports_ust): Call agent_capability_check.
8241 (clear_installed_tracepoints): Assert that agent supports
8242 agent.
8243
8244 2012-03-03 Yao Qi <yao@codesourcery.com>
8245
8246 * linux-low.c (linux_supports_agent): New.
8247 (linux_target_ops): Initialize field `supports_agent' with
8248 linux_supports_agent.
8249 * target.h (struct target_ops) <supports_agent>: New.
8250 (target_supports_agent): New macro.
8251 * server.c (handle_general_set): Handle packet 'QAgent'.
8252 (handle_query): Send `QAgent+'.
8253 * Makefile.in (server.o): Depends on agent.h.
8254
8255 2012-03-03 Yao Qi <yao@codesourcery.com>
8256
8257 * Makefile.in (OBS): Add agent.o.
8258 Add new rule for agent.o.
8259 Track dependence of tracepoint.c on agent.h.
8260 * tracepoint.c (run_inferior_command_1):
8261 (run_inferior_command): Call agent_run_command.
8262 (gdb_ust_connect_sync_socket): Deleted. Move it to
8263 common/agent.c.
8264 (resume_thread, stop_thread): Likewise.
8265 (gdb_ust_socket_init): Renamed to ...
8266 (gdb_agent_socket_init): ... New.
8267 (gdb_ust_thread): Renamed to ...
8268 (gdb_agent_helper_thread): ... New.
8269 (gdb_ust_init): Move some code to ...
8270 (gdb_agent_init): ... here. New.
8271 [HAVE_UST]: Call gdb_ust_init.
8272 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8273 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8274 * config.in, configure: Regenerated.
8275
8276 2012-03-02 Pedro Alves <palves@redhat.com>
8277
8278 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8279 * linux-low.c (struct simple_pid_list): New.
8280 (stopped_pids): New a struct simple_pid_list pointer.
8281 (add_to_pid_list, pull_pid_from_list): New.
8282 (handle_extended_wait): Don't assume the first signal new children
8283 report is SIGSTOP. Adjust call to pull_pid_from_list.
8284 (linux_wait_for_lwp): Adjust.
8285
8286 2012-03-02 Yao Qi <yao@codesourcery.com>
8287
8288 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8289 debug log.
8290
8291 2012-03-02 Yao Qi <yao@codesourcery.com>
8292
8293 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8294 `stop_pc' and `tpoint'. Update caller.
8295
8296 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8297
8298 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8299 * linux-low.c (use_linux_regsets): New macro.
8300 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8301 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8302 (linux_register_in_regsets): New function.
8303 (usr_fetch_inferior_registers): Skip registers covered by
8304 regsets.
8305 (usr_store_inferior_registers): Likewise.
8306 (usr_fetch_inferior_registers): New macro.
8307 (usr_store_inferior_registers): Likewise.
8308 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8309 (linux_store_registers): Likewise.
8310 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8311 prototype.
8312 (init_registers_mips64_dsp_linux): Likewise.
8313 (init_registers_mips_linux): New macro.
8314 (init_registers_mips_dsp_linux): Likewise.
8315 (mips_dsp_num_regs): Likewise.
8316 (DSP_BASE, DSP_CONTROL): New fallback macros.
8317 (mips_base_regs): New macro.
8318 (mips_regmap): Use it. Fix the size.
8319 (mips_dsp_regmap): New variable.
8320 (mips_dsp_regset_bitmap): Likewise.
8321 (mips_arch_setup): New function.
8322 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8323 than mips_regmap.
8324 (mips_cannot_store_register): Likewise.
8325 (the_low_target): Update .arch_setup, .num_regs and .regmap
8326 initializers. Add .regset_bitmap initializer.
8327 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8328 initializer.
8329 * linux-bfin-low.c (the_low_target): Likewise.
8330 * linux-cris-low.c (the_low_target): Likewise.
8331 * linux-crisv32-low.c (the_low_target): Likewise.
8332 * linux-ia64-low.c (the_low_target): Likewise.
8333 * linux-m32r-low.c (the_low_target): Likewise.
8334 * linux-m68k-low.c (the_low_target): Likewise.
8335 * linux-ppc-low.c (the_low_target): Likewise.
8336 * linux-s390-low.c (the_low_target): Likewise.
8337 * linux-sh-low.c (the_low_target): Likewise.
8338 * linux-sparc-low.c (the_low_target): Likewise.
8339 * linux-tic6x-low.c (the_low_target): Likewise.
8340 * linux-x86-low.c (the_low_target): Likewise.
8341 * linux-xtensa-low.c (the_low_target): Likewise.
8342 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8343 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8344 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8345 srv_xmlfiles.
8346 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8347 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8348
8349 2012-02-29 Yao Qi <yao@codesourcery.com>
8350 Pedro Alves <palves@redhat.com>
8351
8352 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8353 `step_over_finished' is true.
8354
8355 2012-02-27 Pedro Alves <palves@redhat.com>
8356
8357 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8358 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8359
8360 2012-02-27 Pedro Alves <palves@redhat.com>
8361
8362 PR server/9684
8363 * linux-low.c (pid_is_stopped): New.
8364 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8365
8366 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8367
8368 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8369 of conditions.
8370
8371 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8372
8373 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8374
8375 2012-02-24 Luis Machado <lgustavo@codesourcery>
8376
8377 * server.c (handle_query): Advertise support for target-side
8378 breakpoint condition evaluation.
8379 (process_point_options): New function.
8380 (process_serial_event): When inserting a breakpoint, check for
8381 a target-side condition that should be evaluated.
8382
8383 * mem-break.c: Include regcache.h and ax.h.
8384 (point_cond_list_t): New data structure.
8385 (breakpoint) <cond_list>: New field.
8386 (find_gdb_breakpoint_at): Make non-static.
8387 (delete_gdb_breakpoint_at): Clear any target-side
8388 conditions.
8389 (clear_gdb_breakpoint_conditions): New function.
8390 (add_condition_to_breakpoint): Likewise.
8391 (add_breakpoint_condition): Likewise.
8392 (gdb_condition_true_at_breakpoint): Likewise.
8393 (gdb_breakpoint_here): Return result directly instead
8394 of going through a local variable.
8395
8396 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8397 (clear_gdb_breakpoint_conditions): Likewise.
8398 (add_breakpoint_condition): Likewise.
8399 (gdb_condition_true_at_breakpoint): Likewise.
8400
8401 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8402 (need_step_over_p): Take target-side breakpoint condition into
8403 consideration.
8404
8405 2012-02-24 Luis Machado <lgustavo@codesourcery>
8406
8407 * server.h: Include tracepoint.h.
8408 (agent_mem_read, agent_get_trace_state_variable_value,
8409 agent_set_trace_state_variable_value,
8410 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8411 get_set_tsv_func_addr): New prototypes.
8412
8413 * ax.h: New include file.
8414 * ax.c: New source file.
8415
8416 * tracepoint.c: Include ax.h.
8417 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8418 agent_expr, eval_result_type): Move to ax.h.
8419 (parse_agent_expr): Rename to ...
8420 (gdb_parse_agent_expr): ... this, make it non-static and move
8421 to ax.h.
8422 (unparse_agent_expr) Rename to ...
8423 (gdb_unparse_agent_expr): ... this, make it non-static and move
8424 to ax.h.
8425 (eval_agent_expr): Rename to ...
8426 (eval_tracepoint_agent_expr): ... this.
8427 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8428 forward declarations.
8429 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8430 (agent_get_trace_state_variable_value): New function.
8431 (agent_set_trace_state_variable_value): New function.
8432 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8433 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8434 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8435 (condition_true_at_tracepoint): Likewise.
8436 (parse_agent_expr): Rename to ...
8437 (gdb_parse_agent_expr): ... this and move to ax.c.
8438 (unparse_agent_expr): Rename to ...
8439 (gdb_unparse_agent_expr): ... this and move to ax.c.
8440 (gdb_agent_op_name): Move to ax.c.
8441 (eval_agent_expr): Rename to ...
8442 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8443 and move to ax.c.
8444 (eval_tracepoint_agent_expr): New function.
8445 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8446 non-static.
8447 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8448 ax.c.
8449 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8450 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8451 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8452 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8453 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8454 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8455 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8456 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8457 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8458 (compile_bytecodes): Remove forward declaration.
8459 (is_goto_target): Move to ax.c.
8460 (compile_bytecodes): Move to ax.c and call
8461 agent_get_trace_state_variable_value (...) and
8462 agent_set_trace_state_variable_value (...).
8463
8464 * Makefile.in: Update ax.c and IPA dependencies.
8465
8466 2012-02-24 Pedro Alves <palves@redhat.com>
8467
8468 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8469 (cmd_bigqtbuffer_circular): ... this. Only handle
8470 'QTBuffer:circular:'.
8471 (handle_tracepoint_general_set): Adjust.
8472
8473 2012-02-16 Yao Qi <yao@codesourcery.com>
8474
8475 * inferiors.c: Move code to ...
8476 * dll.c: .... here. New.
8477 * server.h: Declare clear_dlls.
8478 * Makefile.in (SFILES): Add dll.c.
8479 (OBS): Add dll.o
8480 (dll.o): New rule.
8481
8482 2012-02-11 Yao Qi <yao@codesourcery.com>
8483
8484 * server.c: (handle_monitor_command): Add a new parameter
8485 `own_buf'.
8486 (handle_query): Update caller.
8487
8488 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8489
8490 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8491 * configure, config.in: Regenerate.
8492 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8493 is not defined.
8494
8495 2012-02-02 Pedro Alves <palves@redhat.com>
8496
8497 Try SIGKILL first, then PTRACE_KILL.
8498 * linux-low.c (linux_kill_one_lwp): New.
8499 (linux_kill_one_lwp): Rename to ...
8500 (kill_one_lwp_callback): ... this. Use the new
8501 linux_kill_one_lwp.
8502
8503 2012-02-02 Pedro Alves <palves@redhat.com>
8504
8505 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8506 inferior.
8507
8508 2012-01-27 Pedro Alves <palves@redhat.com>
8509
8510 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8511 (elf_64_file_p): Make static.
8512 (linux_pid_exe_is_elf_64_file): New.
8513 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8514 Delete declarations.
8515 (linux_pid_exe_is_elf_64_file): Declare.
8516 * linux-x86-low.c (x86_arch_setup): Use
8517 linux_pid_exe_is_elf_64_file.
8518
8519 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8520
8521 * linux-low.c (linux_wait_for_event_1): Rename to ...
8522 (linux_wait_for_event): ... here and merge it with former
8523 linux_wait_for_event - new variable wait_ptid, use it.
8524 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8525
8526 2012-01-23 Pedro Alves <palves@redhat.com>
8527
8528 * server.c (main): Avoid yet another case of infinite loop while
8529 detaching/killing after a longjmp.
8530
8531 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8532
8533 Code cleanup.
8534 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8535
8536 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8537
8538 * hostio.c (handle_readlink): New function.
8539 (handle_vFile): Call it to handle "vFile:readlink" packets.
8540
8541 2012-01-20 Pedro Alves <palves@redhat.com>
8542 Ulrich Weigand <ulrich.weigand@linaro.org>
8543
8544 * server.c (handle_v_requests): Only support vAttach and vRun to
8545 start multiple processes when in extended protocol mode.
8546
8547 2012-01-17 Pedro Alves <palves@redhat.com>
8548
8549 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8550 memalign plus mprotect to allocate the scratch buffer.
8551
8552 2012-01-13 Pedro Alves <palves@redhat.com>
8553
8554 * server.c (attach_inferior): Clear `cont_thread'.
8555
8556 2012-01-13 Pedro Alves <palves@redhat.com>
8557
8558 * server.c (main): Avoid infinite loop while detaching/killing
8559 after a longjmp.
8560
8561 2012-01-09 Doug Evans <dje@google.com>
8562
8563 * server.c (start_inferior): Set last_ptid in --wrapper case.
8564
8565 2012-01-06 Yao Qi <yao@codesourcery.com>
8566
8567 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8568 defined.
8569 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8570
8571 2012-01-04 Yao Qi <yao@codesourcery.com>
8572
8573 * tracepoint.c (cmd_qtdp): Print debug message
8574 for static tracepoint.
8575
8576 2012-01-04 Yao Qi <yao@codesourcery.com>
8577
8578 * tracepoint.c (trace_vdebug): Differentiate debug message
8579 between gdbserver and IPA.
8580
8581 2012-01-03 Yao Qi <yao@codesourcery.com>
8582
8583 * tracepoint.c (tracepoint_was_hit): Don't collect for
8584 static tracepoint.
8585
8586 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8587
8588 * terminal.h: Reformat copyright header.
8589
8590 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8591
8592 * server.c (gdbserver_version): Update copyright year.
8593 * gdbreplay.c (gdbreplay_version): Likewise.
8594
8595 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8596
8597 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8598
8599 Revert:
8600 2011-12-18 Hui Zhu <teawater@gmail.com>
8601 * linux-low.c (linux_create_inferior): Save return value to ret.
8602
8603 2011-12-18 Hui Zhu <teawater@gmail.com>
8604
8605 * linux-low.c (linux_create_inferior): Save return value to ret.
8606
8607 2011-12-16 Doug Evans <dje@google.com>
8608
8609 * linux-low.c (linux_create_inferior): If stdio connection,
8610 redirect stdin from /dev/null, stdout to stderr.
8611 * remote-utils.c (remote_is_stdio): New static global.
8612 (remote_connection_is_stdio): New function.
8613 (remote_prepare): Handle stdio connection.
8614 (remote_open): Ditto.
8615 (remote_close): Don't close stdin for stdio connections.
8616 (read_prim,write_prim): New functions. Replace all calls to
8617 read/write to these.
8618 * server.c (main): Watch for "-" argument. Move call to
8619 remote_prepare before start_inferior.
8620 * server.h (STDIO_CONNECTION_NAME): New macro.
8621 (remote_connection_is_stdio): Declare.
8622
8623 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8624 in debugging output.
8625
8626 2011-12-15 Yao Qi <yao@codesourcery.com>
8627
8628 * tracepoint.c: Include sys/syscall.h.
8629 (gdb_ust_thread): Remove preprocessor conditional.
8630
8631 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8632
8633 * linux-low.c (linux_detach_one_lwp): Call
8634 the_low_target.prepare_to_resume before detaching.
8635
8636 2011-12-14 Yao Qi <yao@codesourcery.com>
8637
8638 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8639 of write.
8640
8641 2011-12-14 Yao Qi <yao@codesourcery.com>
8642
8643 * i386-low.c (i386_low_stopped_data_address): Initialize local
8644 variable `control'.
8645
8646 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8647
8648 PR remote/13492
8649
8650 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8651 DR_CONTROL unless necessary. Extend comments.
8652 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8653 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8654
8655 2011-12-13 Yao Qi <yao@codesourcery.com>
8656
8657 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8658 macros.
8659 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8660
8661 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8662
8663 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8664 Print new debug message for such case.
8665
8666 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8667
8668 Fix overlapping memcpy.
8669 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8670 the read_inferior_memory transfer.
8671 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8672 write_inferior_memory transfer.
8673 (set_fast_tracepoint_jump): New variable buf. Use it for the
8674 read_inferior_memory and write_inferior_memory transfers.
8675 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8676 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8677 Use it for the write_inferior_memory transfer.
8678 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8679 buffers.
8680
8681 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8682
8683 * linux-low.c (fetch_register, store_register): Make code
8684 consistent, fix formatting.
8685
8686 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8687
8688 * linux-low.c (usr_store_inferior_registers): Factor out code
8689 to handle individual registers into...
8690 (store_register): ... this new function.
8691
8692 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8693
8694 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8695 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8696 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8697 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8698 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8699 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8700 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8701 (srv_xmlfiles): Add new XML files.
8702
8703 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8704 and <sys/uio.h>.
8705 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8706 (init_registers_s390_linux32v1): Add prototype.
8707 (init_registers_s390_linux32v2): Likewise.
8708 (init_registers_s390_linux64v1): Likewise.
8709 (init_registers_s390_linux64v2): Likewise.
8710 (init_registers_s390x_linux64v1): Likewise.
8711 (init_registers_s390x_linux64v2): Likewise.
8712 (s390_num_regs): Increment to 52.
8713 (s390_regmap): Add orig_r2 register.
8714 (s390_num_regs_3264): Increment to 68.
8715 (s390_regmap_3264): Add orig_r2 register.
8716 (s390_collect_ptrace_register): Handle orig_r2 register.
8717 (s390_supply_ptrace_register): Likewise.
8718 (s390_fill_last_break): New function.
8719 (s390_store_last_break): Likewise.
8720 (s390_fill_system_call): New function.
8721 (s390_store_system_call): Likewise.
8722 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8723 register sets.
8724 (s390_check_regset): New function.
8725 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8726 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8727 Update target_regsets for available register sets.
8728
8729 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8730 Jan Kratochvil <jan.kratochvil@redhat.com>
8731
8732 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8733 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8734 New.
8735 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8736 * linux-low.h (struct process_info_private): New member r_debug.
8737 * server.c (handle_qxfer_libraries): Call
8738 the_target->qxfer_libraries_svr4.
8739 (handle_qxfer_libraries_svr4): New function.
8740 (qxfer_packets): New entry "libraries-svr4".
8741 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8742 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8743 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8744 PACKET_qXfer_libraries_svr4.
8745
8746 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8747
8748 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8749 PSW address/mask between 8-byte and 16-byte formats.
8750 (s390_supply_ptrace_register): Likewise.
8751 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8752 basic addressing mode bit.
8753
8754 2011-11-24 Stan Shebs <stan@codesourcery.com>
8755
8756 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8757
8758 2011-11-17 Stan Shebs <stan@codesourcery.com>
8759
8760 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8761 (tracing_start_time): New global.
8762 (tracing_stop_time): New global.
8763 (tracing_user_name): New global.
8764 (tracing_notes): New global.
8765 (tracing_stop_note): New global.
8766 (cmd_qtstart): Set traceframe_usage, start_time.
8767 (stop_tracing): Set stop_time.
8768 (cmd_qtstatus): Report additional status.
8769 (cmd_qtp): New function.
8770 (handle_tracepoint_query): Call it.
8771 (cmd_qtnotes): New function.
8772 (handle_tracepoint_general_set): Call it.
8773 (get_timestamp): Rename from tsv_get_timestamp.
8774
8775 2011-11-14 Stan Shebs <stan@codesourcery.com>
8776 Kwok Cheung Yeung <kcy@codesourcery.com>
8777
8778 * linux-x86-low.c (small_jump_insn): New.
8779 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8780 trampoline and error message, build a trampoline and issue a small
8781 jump instruction to it.
8782 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8783 trampoline and error message.
8784 (x86_get_min_fast_tracepoint_insn_len): New.
8785 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8786 * linux-low.h (struct linux_target_ops): Add arguments to
8787 install_fast_tracepoint_jump_pad operation, add new operation.
8788 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8789 arguments.
8790 (linux_get_min_fast_tracepoint_insn_len): New function.
8791 (linux_target_op): Add new operation.
8792 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8793 (gdb_trampoline_buffer_end): Ditto.
8794 (gdb_trampoline_buffer_error): Ditto.
8795 (struct ipa_sym_addresses): Add fields for new IPA variables.
8796 (symbol_list): Add entries for new IPA variables.
8797 (struct tracepoint): Add fields to hold the address range of the
8798 trampoline used by the tracepoint.
8799 (trampoline_buffer_head): New static variable.
8800 (trampoline_buffer_tail): Ditto.
8801 (claim_trampoline_space): New function.
8802 (have_fast_tracepoint_trampoline_buffer): New function.
8803 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8804 structure.
8805 (install_fast_tracepoint): Ditto, also add error buffer argument.
8806 (cmd_qtminftpilen): New function.
8807 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8808 (fast_tracepoint_from_trampoline_address): New function.
8809 (fast_tracepoint_collecting): Handle trampoline as part of jump
8810 pad space.
8811 (set_trampoline_buffer_space): New function.
8812 (initialize_tracepoint): Initialize new IPA variables.
8813 * target.h (struct target_ops): Add arguments to
8814 install_fast_tracepoint_jump_pad operation, add new
8815 get_min_fast_tracepoint_insn_len operation.
8816 (target_get_min_fast_tracepoint_insn_len): New.
8817 (install_fast_tracepoint_jump_pad): Add arguments.
8818 * server.h (IPA_BUFSIZ): Define.
8819 * linux-i386-ipa.c: Include extra header files.
8820 (initialize_fast_tracepoint_trampoline_buffer): New function.
8821 (initialize_low_tracepoint): Call it.
8822 * server.h (set_trampoline_buffer_space): Declare.
8823 (claim_trampoline_space): Ditto.
8824 (have_fast_tracepoint_trampoline_buffer): Ditto.
8825
8826 2011-11-14 Yao Qi <yao@codesourcery.com>
8827
8828 * server.c (handle_query): Handle InstallInTrace for qSupported.
8829 * tracepoint.c (add_tracepoint): Sort list.
8830 (install_tracepoint, download_tracepoint): New.
8831 (cmd_qtdp): Call them to install and download tracepoints.
8832 (sort_tracepoints): Removed.
8833 (cmd_qtstart): Update.
8834
8835 2011-11-14 Yao Qi <yao@codesourcery.com>
8836
8837 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8838 * mem-break.h: Declare.
8839 * tracepoint.c (cmd_qtstart): Move some code to ...
8840 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8841 New.
8842 (download_tracepoints): Move some code to ...
8843 (download_tracepoint_1): ... here. New.
8844
8845 2011-11-08 Yao Qi <yao@codesourcery.com>
8846
8847 * remote-utils.c (relocate_instruction): A comment fix.
8848
8849 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8850
8851 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8852 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8853 dr_status_mirror and dr_control_mirror from debug_reg_state.
8854 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8855 (i386_initial_stuff): Remove use of deleted globals.
8856 (i386_get_thread_context, i386_set_thread_context,
8857 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8858 from debug_reg_state.
8859
8860 2011-11-05 Yao Qi <yao@codesourcery.com>
8861
8862 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8863 address as TPOINT's.
8864
8865 2011-11-02 Stan Shebs <stan@codesourcery.com>
8866
8867 * tracepoint.c (agent_mem_read_string): New function.
8868 (eval_agent_expr): Call it for tracenz.
8869 * server.c (handle_query): Report support for tracenz.
8870
8871 2011-11-02 Yao Qi <yao@codesourcery.com>
8872
8873 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8874
8875 2011-11-02 Yao Qi <yao@codesourcery.com>
8876
8877 * target.h: Fix a typo in comment.
8878
8879 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8880
8881 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8882 clobber the breakpoints' shadows with fast tracepoint jumps.
8883 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8884 * target.c (write_inferior_memory): Also pass MYADDR down to
8885 check_mem_write.
8886
8887 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8888
8889 * configure.ac: Check support for personality routine.
8890 * configure: Regenerate.
8891 * config.in: Likewise.
8892 * linux-low.c: Include <sys/personality.h>.
8893 Define ADDR_NO_RANDOMIZE if necessary.
8894 (linux_create_inferior): Disable address space randomization when
8895 forking inferior, if requested.
8896 (linux_supports_disable_randomization): New function.
8897 (linux_target_ops): Install it.
8898 * server.h (disable_randomization): Declare.
8899 * server.c (disable_randomization): New global variable.
8900 (handle_general_set): Handle QDisableRandomization.
8901 (handle_query): Likewise for qSupported.
8902 (main): Support --disable-randomization and --no-disable-randomization
8903 command line arguments.
8904 * target.h (struct target_ops): Add supports_disable_randomization.
8905 (target_supports_disable_randomization): New macro.
8906
8907 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8908
8909 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8910 ifdef check.
8911 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8912 [!PT_GETDSBT] (target_loadmap): New definition.
8913 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8914 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8915 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8916 and PT_GETDSBT to LINUX_LOADMAP.
8917 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8918 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8919
8920 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8921
8922 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8923 (arm_linux_hwbp_cap): New static variable.
8924 (arm_linux_get_hwbp_cap): Replace by ...
8925 (arm_linux_init_hwbp_cap): ... this new function.
8926 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8927 (arm_linux_get_hw_watchpoint_count): Likewise.
8928 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8929 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8930 (arm_prepare_to_resume): Use perror_with_name instead of error.
8931
8932 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8933
8934 * linux-arm-low.c: Include <signal.h>.
8935 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8936 (struct arm_linux_hwbp_cap): New data type.
8937 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8938 (struct arm_linux_hw_breakpoint): New data type.
8939 (MAX_BPTS, MAX_WPTS): Define.
8940 (struct arch_process_info, struct arch_lwp_info): New data types.
8941 (arm_linux_get_hwbp_cap): New function.
8942 (arm_linux_get_hw_breakpoint_count): Likewise.
8943 (arm_linux_get_hw_watchpoint_count): Likewise.
8944 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8945 (arm_hwbp_control_initialize): Likewise.
8946 (arm_hwbp_control_is_enabled): Likewise.
8947 (arm_hwbp_control_is_initialized): Likewise.
8948 (arm_hwbp_control_disable): Likewise.
8949 (arm_linux_hw_breakpoint_equal): Likewise.
8950 (arm_linux_hw_point_initialize): Likewise.
8951 (struct update_registers_data): New data structure.
8952 (update_registers_callback: New function.
8953 (arm_insert_point): Likewise.
8954 (arm_remove_point): Likewise.
8955 (arm_stopped_by_watchpoint): Likewise.
8956 (arm_stopped_data_address): Likewise.
8957 (arm_new_process): Likewise.
8958 (arm_new_thread): Likewise.
8959 (arm_prepare_to_resume): Likewise.
8960 (the_low_target): Register arm_insert_point, arm_remove_point,
8961 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8962 arm_new_thread, and arm_prepare_to_resume.
8963
8964 2011-09-15 Stan Shebs <stan@codesourcery.com>
8965
8966 * server.h (struct emit_ops): Add compare-goto fields.
8967 * tracepoint.c (gdb_agent_op_sizes): New table.
8968 (emit_eq_goto): New function.
8969 (emit_ne_goto): New function.
8970 (emit_lt_goto): New function.
8971 (emit_le_goto): New function.
8972 (emit_gt_goto): New function.
8973 (emit_ge_goto): New function.
8974 (is_goto_target): New function.
8975 (compile_bytecodes): Recognize special cases of compare-goto
8976 combinations and call specialized emitters for them.
8977 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8978 (amd64_emit_ne_goto): New function.
8979 (amd64_emit_lt_goto): New function.
8980 (amd64_emit_le_goto): New function.
8981 (amd64_emit_gt_goto): New function.
8982 (amd64_emit_ge_goto): New function.
8983 (amd64_emit_ops): Add the new functions.
8984 (i386_emit_eq_goto): New function.
8985 (i386_emit_ne_goto): New function.
8986 (i386_emit_lt_goto): New function.
8987 (i386_emit_le_goto): New function.
8988 (i386_emit_gt_goto): New function.
8989 (i386_emit_ge_goto): New function.
8990 (i386_emit_ops): Add the new functions.
8991
8992 2011-09-08 Stan Shebs <stan@codesourcery.com>
8993
8994 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8995 (i386_emit_epilogue): Restore %ebx.
8996
8997 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8998
8999 * server.c (step_thread): Remove definition.
9000 (process_serial_event): Don't handle Hs.
9001 * server.h (step_thread): Remove declaration.
9002 * target.c (set_desired_inferior): Remove use of step_thread.
9003
9004 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9005
9006 * linux-low.c: Include linux-procfs.h.
9007 (linux_attach_lwp_1): Update comments.
9008 (linux_attach): Scan for existing threads when attaching to a
9009 process that is the tgid.
9010 * Makefile.in: Update dependencies.
9011
9012 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9013
9014 * configure.srv: Add linux-procfs.o dependencies.
9015
9016 2011-08-14 Yao Qi <yao@codesourcery.com>
9017
9018 * target.h (struct target_ops): Fix indent.
9019 * win32-low.c (win32_target_ops): Fix comment.
9020
9021 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9022 Yao Qi <yao@codesourcery.com>
9023
9024 * Makefile.in (clean): Remove tic6x-*.c files.
9025 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9026 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9027 (tic6x-c64xp-linux.c): Likewise.
9028 * configure.srv: Add support for tic6x-*-uclinux.
9029 * linux-tic6x-low.c: New.
9030 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9031
9032 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9033 Yao Qi <yao@codesourcery.com>
9034
9035 * target.h (struct target_ops): Add read_loadmap.
9036 * linux-low.c (struct target_loadseg): New type.
9037 (struct target_loadmap): New type.
9038 (linux_read_loadmap): New function.
9039 (linux_target_ops): Add linux_read_loadmap.
9040 * server.c (handle_query): Support qXfer:fdpic:read packet.
9041 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9042 to NULL.
9043
9044 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9045
9046 * win32-low.c: Include <stdint.h>.
9047
9048 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9049
9050 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9051 to the inferior here.
9052 (i386_remove_aligned_watchpoint): Ditto.
9053 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9054 fit part of the watchpoint in the debug registers.
9055 (i386_update_inferior_debug_regs): New.
9056 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9057 registers, and only update the inferior on success.
9058 (i386_low_remove_watchpoint): Ditto.
9059
9060 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9061
9062 * linux-low.c (compare_ints, unique, list_threads, show_process,
9063 linux_core_of_thread): Delete.
9064 (linux_target_ops): Change linux_core_of_thread to
9065 linux_common_core_of_thread.
9066 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9067 * utils.c (malloc_failure): Change type of argument.
9068 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9069 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9070 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9071 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9072 (IPA_OBJS): Add common-utils-ipa.o.
9073 (ptid_h, linux_osdata_h): New macros.
9074 (server_h): Add common/common-utils.h, common/xml-utils.h,
9075 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9076 common/ptid.h.
9077 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9078 ptid.o, buffer.o): New rules.
9079 (linux-low.o): Add common/linux-osdata.h as a dependency.
9080 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9081 * configure.ac: Add AC_HEADER_DIRENT check.
9082 * config.in: Regenerate.
9083 * configure: Regenerate.
9084 * remote-utils.c (xml_escape_text): Delete.
9085 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9086 buffer_xml_printf): Move to common/buffer.c.
9087 * server.c (main): Remove call to initialize_inferiors.
9088 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9089 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9090 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9091 internal_error, gdb_assert, gdb_assert_fail): Delete.
9092 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9093 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9094 common/buffer.h.
9095 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9096 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9097 initialize_inferiors): Delete.
9098
9099 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9100
9101 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9102 symbol error.
9103
9104 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9105
9106 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9107 assertion.
9108 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9109
9110 2011-05-26 Yao Qi <yao@codesourcery.com>
9111
9112 * Makefile.in (thread-db.o): Track dependence to
9113 common/gdb_thread_db.h.
9114 * thread-db.c: include gdb_thread_db.h from right place.
9115
9116 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9117
9118 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9119 __FILE__ and __LINE__ to internal_error.
9120
9121 2011-05-13 Doug Evans <dje@google.com>
9122
9123 * thread-db.c (try_thread_db_load_from_sdir): New function.
9124 (try_thread_db_load_from_dir): New function.
9125 (thread_db_load_search): Handle $sdir, ignore $pdir.
9126 Remove trying of system directories if search of
9127 libthread-db-search-path fails, that is now done via $sdir.
9128
9129 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9130
9131 * server.c (handle_query): Add EnableDisableTracepoints to the list
9132 of supported features.
9133 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9134 tracepoints.
9135 (cmd_qtenable_disable): New.
9136 (cmd_qtstart): Install tracepoints even if disabled.
9137 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9138 receiving a QTEnable or QTDisable packet.
9139 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9140 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9141 tracepoints.
9142 (gdb_probe): Skip data collection if static tracepoint is disabled.
9143
9144 2011-05-10 Doug Evans <dje@google.com>
9145
9146 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9147
9148 2011-05-04 Doug Evans <dje@google.com>
9149
9150 * linux-low.c (linux_join): Skip process lookup.
9151 * spu-low.c (spu_join): Ditto.
9152 * server.c (join_inferiors_callback): Delete.
9153 (process_serial_event): For 'D' packet (detach) call join_inferior
9154 directly.
9155
9156 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9157
9158 * README: Don't mention xscale*-*-linux*.
9159 * configure.srv (xscale*-*-linux*): Don't handle target.
9160
9161 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9162
9163 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9164 casting pointers.
9165 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9166 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9167 (i386_emit_void_call_2): Likewise.
9168
9169 2011-04-26 Yao Qi <yao@codesourcery.com>
9170
9171 * linux-low.c: Move common macros to linux-ptrace.h.
9172 Include linux-ptrace.h.
9173 * Makefile.in (linux_ptrace_h): New.
9174 (linux-low.o): Depends on linux-ptrace.h.
9175
9176 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9177
9178 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9179 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9180 (remote_prepare): New function with most of the TCP code from ...
9181 (remote_open): ... here. Detect PORT here unconditionally. Move also
9182 setting transport_is_reliable.
9183 * server.c (run_once): New variable.
9184 (gdbserver_usage): Document it.
9185 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9186 the first run if RUN_ONCE.
9187 * server.h (run_once, remote_prepare): New declarations.
9188
9189 2011-04-19 Tom Tromey <tromey@redhat.com>
9190
9191 * win32-low.c (handle_load_dll): Remove duplicate "the".
9192
9193 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9194
9195 Remove support for old Cygwin 1.5 versions.
9196 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9197 function to avoid warning.
9198 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9199 warning.
9200
9201 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9202
9203 * gdbserver/server.h (Macro _): Define it if not available.
9204
9205 2011-03-14 Michael Snyder <msnyder@vmware.com>
9206
9207 * hostio.c (handle_close): Remove unnecessary null test.
9208
9209 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9210
9211 * Makefile.in (maintainer-clean realclean distclean): Remove
9212 "make ... subdir_do" command.
9213
9214 2011-03-10 Michael Snyder <msnyder@vmware.com>
9215
9216 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9217
9218 * server.c (handle_v_run): Free alloced buffer on early return.
9219
9220 2011-03-09 Yao Qi <yao@codesourcery.com>
9221
9222 Revert:
9223 2011-03-04 Yao Qi <yao@codesourcery.com>
9224
9225 * Makefile.in: Remove GNU make feature --directory.
9226
9227 2011-03-05 Yao Qi <yao@codesourcery.com>
9228
9229 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9230 (subdir_do): New make target. Copied from gdb/Makefile.
9231 (maintainer-clean, realclean, distclean, clean): Call corresponding
9232 make targets in common/Makefile.
9233
9234 2011-02-11 Yao Qi <yao@codesourcery.com>
9235
9236 * configure.ac: Call AC_PROG_RANLIB.
9237 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9238 * configure: Regenerate.
9239
9240 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9241
9242 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9243
9244 2011-03-06 Yao Qi <yao@codesourcery.com>
9245
9246 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9247
9248 2011-03-05 Yao Qi <yao@codesourcery.com>
9249
9250 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9251 (subdir_do): New make target. Copied from gdb/Makefile.
9252 (maintainer-clean, realclean, distclean, clean): Call corresponding
9253 make targets in common/Makefile.
9254
9255 2011-03-04 Yao Qi <yao@codesourcery.com>
9256
9257 * Makefile.in: Remove GNU make feature --directory.
9258
9259 2011-03-04 Michael Snyder <msnyder@vmware.com>
9260
9261 * server.c (queue_stop_reply): Call xmalloc not malloc.
9262
9263 2011-03-02 Michael Snyder <msnyder@vmware.com>
9264
9265 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9266
9267 2011-02-28 Michael Snyder <msnyder@vmware.com>
9268
9269 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9270 (cmd_qtframe): Ditto.
9271 (cmd_qtbuffer): Ditto.
9272 (cmd_bigqtbuffer): Ditto.
9273
9274 * utils.c (decimal2str): Initialize 'width' to nine, then
9275 don't mess with it.
9276
9277 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9278
9279 * hostio.c (require_data): Free *data, not data.
9280
9281 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9282
9283 * hostio.c (require_data): Use free, not xfree.
9284
9285 2011-02-27 Michael Snyder <msnyder@vmware.com>
9286
9287 * server.c (handle_query): Discard unused value.
9288
9289 * hostio.c (require_data): Free malloc memory before returning
9290 error.
9291
9292 2011-02-26 Michael Snyder <msnyder@vmware.com>
9293
9294 * linux-low.c (list_threads): Call closedir for dirent.
9295
9296 2011-02-27 Michael Snyder <msnyder@vmware.com>
9297
9298 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9299 a case statement falls through.
9300
9301 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9302
9303 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9304 in comparison.
9305
9306 2011-02-26 Michael Snyder <msnyder@vmware.com>
9307
9308 * utils.c (decimal2str): Eliminate dead code and dead param.
9309 (pulongest): Drop dead param from call to decimal2str.
9310 (plongest): Ditto.
9311
9312 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9313
9314 Revert the following patch (not approved yet):
9315 2011-02-21 Hui Zhu <teawater@gmail.com>
9316 * tracepoint.c (tp_printf): New function.
9317 (eval_agent_expr): Handle gdb_agent_op_printf.
9318
9319 2011-02-21 Hui Zhu <teawater@gmail.com>
9320
9321 * tracepoint.c (tp_printf): New function.
9322 (eval_agent_expr): Handle gdb_agent_op_printf.
9323
9324 2011-02-18 Tom Tromey <tromey@redhat.com>
9325
9326 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9327 (tracepoint.o): Likewise.
9328 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9329 (gdb_agent_op_names): Likewise.
9330
9331 2011-02-18 Tom Tromey <tromey@redhat.com>
9332
9333 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9334 gdb_agent_op_rot>: New constants.
9335 (gdb_agent_op_names): Add pick and roll.
9336 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9337 cases.
9338
9339 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9340
9341 * aclocal.m4: Regenerated with aclocal-1.11.1.
9342
9343 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9344
9345 * server.c (handle_qxfer_traceframe_info): New.
9346 (qxfer_packets): Register "traceframe-info".
9347 (handle_query): Report support for qXfer:traceframe-info:read+.
9348 * tracepoint.c (match_blocktype): New.
9349 (traceframe_find_block_type): Rename to ...
9350 (traceframe_walk_blocks): ... this. Add callback filter argument,
9351 and use it.
9352 (traceframe_find_block_type): New, reimplemented on top of
9353 traceframe_walk_blocks.
9354 (build_traceframe_info_xml): New.
9355 (traceframe_read_info): New.
9356 * server.h (traceframe_read_info): Declare.
9357
9358 2011-02-11 Yao Qi <yao@codesourcery.com>
9359
9360 * configure.ac: Call AC_PROG_RANLIB.
9361 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9362 * configure: Regenerate.
9363
9364 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9365
9366 * server.c (gdb_read_memory): Change return semantics to allow
9367 partial transfers.
9368 (handle_search_memory_1): Adjust.
9369 (process_serial_event) <'m' packet>: Handle partial transfers.
9370 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9371
9372 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9373
9374 * regcache.c (init_register_cache): Initialize
9375 regcache->register_status.
9376 (free_register_cache): Release regcache->register_status.
9377 (regcache_cpy): Copy register_status.
9378 (registers_to_string): Print 'x's for unavailable registers.
9379 (supply_register): Mark the register's status valid or
9380 unavailable, depending on whether a buffer was passed in or not.
9381 (supply_register_zeroed): New.
9382 (supply_regblock): Mark the registers' status valid or
9383 unavailable, depending on whether a buffer was passed in or not.
9384 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9385 (struct regcache): New `register_status' field.
9386 (supply_register_zeroed): Declare.
9387 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9388 supply_register_zeroed, rather than passing a NULL buffer to
9389 supply_register.
9390 * tracepoint.c (fetch_traceframe_registers): Update comment.
9391
9392 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9393
9394 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9395 buffer explicit.
9396
9397 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9398
9399 * server.h (decode_xfer_write): Change prototype.
9400 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9401 and don't extract the annex here.
9402 * server.c (decode_xfer_read): Remove `annex' parameter,
9403 and don't extract the annex here.
9404 (decode_xfer): New.
9405 (struct qxfer): New.
9406 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9407 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9408 (handle_qxfer_statictrace): New functions, abstracted out from
9409 handle_query, and made to use the struct qxfer interface.
9410 (handle_threads_qxfer_proper): Rename to ...
9411 (handle_qxfer_threads_proper): ... this.
9412 (handle_threads_qxfer): Rename to ...
9413 (handle_qxfer_threads): ... this. Adjust.
9414 (qxfer_packets): New array.
9415 (handle_qxfer): New function.
9416 (handle_query): Use handle_qxfer.
9417
9418 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9419
9420 * gdbreplay.c: Shorten lines of >= 80 columns.
9421 * linux-low.c: Ditto.
9422 * linux-ppc-low.c: Ditto.
9423 * linux-s390-low.c: Ditto.
9424 * linux-sparc-low.c: Ditto.
9425 * linux-x86-low.c: Ditto.
9426 * linux-xtensa-low.c: Ditto.
9427 * mem-break.c: Ditto.
9428 * nto-low.c: Ditto.
9429 * regcache.h: Ditto.
9430 * remote-utils.c: Ditto.
9431 * server.c: Ditto.
9432 * server.h: Ditto.
9433 * thread-db.c: Ditto.
9434 * tracepoint.c: Ditto.
9435 * utils.c: Ditto.
9436 * win32-low.h: Ditto.
9437
9438 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9439
9440 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9441 update.
9442
9443 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9444
9445 * server.c (gdbserver_version): Update copyright year in version
9446 output.
9447 * gdbreplay.c (gdbreplay_version): Ditto.
9448
9449 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9450
9451 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9452 * linux-bfin-low.c: New file.
9453 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9454 PT_DATA_ADDR for BFIN targets.
9455 * Makefile.in (SFILES): Add linux-bfin-low.c.
9456 (clean): Remove reg-bfin.c.
9457 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9458 * README: Mention supported Blackfin targets.
9459
9460 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9461
9462 * .gitignore: New file.
9463
9464 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9465
9466 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9467
9468 2010-10-22 Jie Zhang <jie@codesourcery.com>
9469
9470 * Makefile.in: Add FLAGS_TO_PASS variable.
9471 (install): Remove dependency of install-only and recursively
9472 invoke make for install-only.
9473
9474 2010-10-04 Doug Evans <dje@google.com>
9475
9476 * Makefile.in (uninstall): Use $(DESTDIR).
9477
9478 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9479
9480 PR gdb/11842
9481
9482 * linux-x86-low.c (compat_siginfo_from_siginfo)
9483 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9484 si_code is < 0. Check for si_code == SI_TIMER before checking for
9485 si_code < 0.
9486
9487 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9488
9489 * lynx-i386-low.c: New file.
9490 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9491
9492 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9493
9494 * lynx-low.c (ptrace_request_to_str): Remove handling for
9495 request values that have been removed in LynxOS 5.x.
9496
9497 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9498
9499 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9500 <ptrace.h>
9501
9502 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9503
9504 * configure.ac: Add --enable-inprocess-agent option.
9505 * configure: Rebuilt.
9506
9507 2010-09-06 Yao Qi <yao@codesourcery.com>
9508
9509 * linux-low.c (linux_kill): Remove unused variable.
9510 (linux_stabilize_threads): Likewise.
9511 * server.c (start_inferior): Likewise.
9512 (queue_stop_reply_callback): Likewise.
9513 * tracepoint.c (do_action_at_tracepoint): Likewise.
9514
9515 2010-09-06 Yao Qi <yao@codesourcery.com>
9516
9517 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9518 on return.
9519
9520 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9521
9522 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9523
9524 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9525
9526 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9527 "$(IPA_DEPFILES)".
9528
9529 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9530
9531 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9532 gdbserver/lynx-ppc-low.c: New files.
9533 * Makefile.in (lynx_low_h): New variable.
9534 (lynx-low.o, lynx-ppc-low.o): New rules.
9535 * configure.ac: On LynxOS, link with -lnetinet.
9536 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9537 * configure: regenerate.
9538
9539 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9540
9541 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9542 * configure.ac: Add check for vasprintf and vsnprintf.
9543 * configure, config.in: Regenerate.
9544 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9545
9546 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9547
9548 * gdbreplay.c: Move include of alloca.h up, next to include of
9549 malloc.h.
9550 * server.h: Add include of malloc.h.
9551 * mem-break.c: Remove include of malloc.h.
9552 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9553
9554 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9555
9556 * Makefile.in (memmem.o): Build with -Wno-error.
9557
9558 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9559
9560 * utils.c (xsnprintf): Make non-static.
9561 * server.h: Add xsnprintf declaration.
9562 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9563 replace calls to snprintf by calls to xsnprintf throughout.
9564
9565 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9566
9567 * configure.ac: Add configure check for alloca.
9568 * configure, config.in: Regenerate.
9569 * server.h: Include alloca.h if it exists.
9570 * gdbreplay.c: Include alloca.h if it exists.
9571
9572 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9573
9574 * linux-low.c (__SIGRTMIN): Define if not already defined.
9575 (linux_create_inferior): Check for __ANDROID__ rather than
9576 __SIGRTMIN.
9577 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9578 are already deferred.
9579 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9580 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9581 stopped and already has a pending signal to report.
9582 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9583 a pending signal to report or is moving out of a jump pad.
9584 (linux_init_signals): Check for __ANDROID__ rather than
9585 __SIGRTMIN.
9586
9587 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9588
9589 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9590 debug_threads check. Avoid a linear search when not doing debug
9591 output.
9592
9593 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9594
9595 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9596 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9597 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9598 (process_event): Change local fd's type to gdb_fildes_t.
9599 (create_file_handler): Adjust prototype.
9600 (delete_file_handler): Adjust prototype.
9601 (handle_file_event): Adjust prototype. Use pfildes.
9602 (create_file_event): Adjsut prototype.
9603 * remote-utils.c (remote_desc, listen_desc): Change type to
9604 gdb_fildes_t.
9605 * server.h: New gdb_fildes_t typedef.
9606 [USE_WIN32API]: Include winsock2.h.
9607 (delete_file_handler, add_file_handler): Adjust prototypes.
9608 (pfildes): Declare.
9609 * utils.c (pfildes): New.
9610
9611 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9612
9613 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9614 * configure: Regenerate.
9615
9616 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9617
9618 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9619 (linux_done_accessing_memory): ... this.
9620 (linux_target_ops): Adjust.
9621 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9622 * nto-low.c (nto_target_ops): Adjust comment.
9623 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9624 * spu-low.c (spu_target_ops): Adjust comment.
9625 * target.h (target_ops): Rename unprepare_to_access_memory field
9626 to done_accessing_memory.
9627 (unprepare_to_access_memory): Rename to ...
9628 (done_accessing_memory): ... this.
9629
9630 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9631
9632 * linux-low.c (linux_prepare_to_access_memory): New.
9633 (linux_unprepare_to_access_memory): New.
9634 (linux_target_ops): Install them.
9635 * server.c (read_memory): Rename to ...
9636 (gdb_read_memory): ... this. Use
9637 prepare_to_access_memory/prepare_to_access_memory.
9638 (write_memory): Rename to ...
9639 (gdb_write_memory): ... this. Use
9640 prepare_to_access_memory/prepare_to_access_memory.
9641 (handle_search_memory_1): Adjust.
9642 (process_serial_event): Adjust.
9643 * target.h (struct target_ops): New fields
9644 prepare_to_access_memory and unprepare_to_access_memory.
9645 (prepare_to_access_memory, unprepare_to_access_memory): New.
9646 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9647 prepare_to_access_memory/prepare_to_access_memory.
9648 * nto-low.c (nto_target_ops): Adjust.
9649 * spu-low.c (spu_target_ops): Adjust.
9650 * win32-low.c (win32_target_ops): Adjust.
9651
9652 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9653
9654 * Makefile.in (WARN_CFLAGS): Get it from configure.
9655 (WERROR_CFLAGS): New.
9656 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9657 * configure.ac: Introduce --enable-werror, which adds -Werror to
9658 the compiler command line. Enabled by default. Disable with
9659 --disable-werror. Add -Wdeclaration-after-statement
9660 Wpointer-arith and -Wformat-nonliteral to warning flags.
9661 * configure: Regenerate.
9662
9663 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9664
9665 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9666
9667 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9668
9669 * gdbreplay.c (remote_error): New.
9670 (gdbchar): New.
9671 (expect): Use gdbchar. Check for error reading from GDB.
9672 Clarify sync error output.
9673 (play): Check for errors writing to GDB.
9674 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9675 * remote-utils.c (getpkt): Check for errors writing to the remote
9676 descriptor.
9677
9678 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9679
9680 * linux-low.c (linux_wait_1): Move non-debugging code out of
9681 `debug_threads' control.
9682
9683 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9684
9685 * linux-low.c (linux_wait_1): Don't set last_status here.
9686 * server.c (push_event, queue_stop_reply_callback): Assert we're
9687 not pushing a TARGET_WAITKIND_IGNORE event.
9688 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9689 (myresume, handle_target_event): Set the thread's last_resume_kind
9690 and last_status from the target returned status.
9691
9692 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9693
9694 PR threads/10729
9695
9696 * linux-x86-low.c (update_debug_registers_callback): New.
9697 (i386_dr_low_set_addr): Use it.
9698 (i386_dr_low_get_addr): New.
9699 (i386_dr_low_set_control): Use update_debug_registers_callback.
9700 (i386_dr_low_get_control): New.
9701 (i386_dr_low_get_status): Adjust.
9702 * linux-low.c (linux_stop_lwp): New.
9703 * linux-low.h (linux_stop_lwp): Declare.
9704
9705 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9706 argument instead of a i386_debug_reg_state.
9707 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9708 a i386_debug_reg_state.
9709 (i386_insert_aligned_watchpoint): Adjust.
9710 (i386_remove_aligned_watchpoint): Adjust.
9711 (i386_low_stopped_data_address): Read the debug registers from the
9712 inferior instead of from the mirrors.
9713 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9714 (i386_dr_low_get_addr): Declare.
9715 (i386_dr_low_get_control): Declare.
9716 (i386_dr_low_get_status): Change prototype.
9717
9718 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9719 (i386_dr_low_get_addr): New.
9720 (i386_dr_low_get_control): New.
9721 (i386_dr_low_get_status): Adjust prototype. Return
9722 dr_status_mirror.
9723 (i386_initial_stuff): Clear dr_status_mirror and
9724 dr_control_mirror.
9725 (i386_get_thread_context): Adjust.
9726 (i386_set_thread_context): Adjust.
9727 (i386_thread_added): Adjust.
9728
9729 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9730
9731 * linux-low.h (linux_thread_area): Delete declaration.
9732
9733 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9734
9735 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9736 after its termination.
9737
9738 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9739
9740 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9741 (gdb_wants_all_stopped): Delete.
9742 (linux_wait_1): Don't call them.
9743 * server.c (handle_v_cont): Tag all threads as want-stopped.
9744 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9745 stopped as "client-wants-stopped".
9746
9747 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9748
9749 * Makefile.in (signals_h): New.
9750 (server_h): Depend on it.
9751 (server.o): Don't depend on $(signals_def).
9752 (signals.o): Depend on $(signals_def).
9753
9754 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9755
9756 * Makefile.in (signals_def): New.
9757 (server_h): Append include/gdb/signals.h and signals_def.
9758 (server.o): Append signals_def.
9759
9760 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9761
9762 * server.c (handle_target_event): Use target_signal_to_host for
9763 resume_info.sig initialization.
9764 * target.h (struct thread_resume) <sig>: New comment.
9765
9766 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9767
9768 * server.c (handle_query): strcpy() the returned string from paddress()
9769 instead of sprintf().
9770 * utils.c (paddress): Return phex_nz().
9771
9772 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9773
9774 * server.c (handle_v_cont): Call mourn_inferior if process
9775 just exited.
9776 (myresume): Likewise.
9777
9778 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9779
9780 Static tracepoints, and integration with UST.
9781
9782 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9783 * mem-break.c (uninsert_all_breakpoints)
9784 (reinsert_all_breakpoints): New.
9785 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9786 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9787 (gdb_agent_ust_loaded, helper_thread_id)
9788 (gdb_agent_helper_thread_id): New macros.
9789 (struct ipa_sym_addresses): Add addr_ust_loaded,
9790 addr_helper_thread_id, addr_cmd_buf.
9791 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9792 (in_process_agent_loaded_ust): New.
9793 (write_e_ust_not_loaded): New.
9794 (maybe_write_ipa_ust_not_loaded): New.
9795 (struct collect_static_trace_data_action): New.
9796 (enum tracepoint_type) <static_tracepoint>: New.
9797 (struct tracepoint) <handle>: Mention static tracepoints.
9798 (struct static_tracepoint_ctx): New.
9799 (CMD_BUF_SIZE): New.
9800 (add_tracepoint_action): Handle static tracepoint actions.
9801 (unprobe_marker_at): New.
9802 (clear_installed_tracepoints): Handle static tracepoints.
9803 (cmd_qtdp): Handle static tracepoints.
9804 (probe_marker_at): New.
9805 (cmd_qtstart): Handle static tracepoints.
9806 (response_tracepoint): Handle static tracepoints.
9807 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9808 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9809 (get_context_regcache): Handle static tracepoints.
9810 (do_action_at_tracepoint): Handle static tracepoint actions.
9811 (traceframe_find_block_type): Handle static trace data blocks.
9812 (traceframe_read_sdata): New.
9813 (download_tracepoints): Download static tracepoint actions.
9814 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9815 (GDB_PROBE_NAME): New.
9816 (ust_ops): New.
9817 (GET_UST_SYM): New.
9818 (USTF): New.
9819 (dlsym_ust): New.
9820 (ust_marker_to_static_tracepoint): New.
9821 (gdb_probe): New.
9822 (collect_ust_data_at_tracepoint): New.
9823 (gdb_ust_probe): New.
9824 (UNIX_PATH_MAX, SOCK_DIR): New.
9825 (gdb_ust_connect_sync_socket): New.
9826 (resume_thread, stop_thread): New.
9827 (run_inferior_command): New.
9828 (init_named_socket): New.
9829 (gdb_ust_socket_init): New.
9830 (cstr_to_hexstr): New.
9831 (next_st): New.
9832 (first_marker, next_marker): New.
9833 (response_ust_marker): New.
9834 (cmd_qtfstm, cmd_qtsstm): New.
9835 (unprobe_marker_at, probe_marker_at): New.
9836 (cmd_qtstmat, gdb_ust_thread): New.
9837 (gdb_ust_init): New.
9838 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9839 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9840 (ST_REGENTRY): New.
9841 (x86_64_st_collect_regmap): New.
9842 (X86_64_NUM_ST_COLLECT_GREGS): New.
9843 (AMD64_RIP_REGNUM): New.
9844 (supply_static_tracepoint_registers): New.
9845 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9846 (ST_REGENTRY): New.
9847 (i386_st_collect_regmap): New.
9848 (i386_NUM_ST_COLLECT_GREGS): New.
9849 (supply_static_tracepoint_registers): New.
9850 * server.c (handle_query): Handle qXfer:statictrace:read.
9851 <qSupported>: Report support for StaticTracepoints, and
9852 qXfer:statictrace:read features.
9853 * server.h (traceframe_read_sdata)
9854 (supply_static_tracepoint_registers): Declare.
9855 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9856 (unpack_varlen_hex): Include in IPA build.
9857 * Makefile.in (ustlibs, ustinc): New.
9858 (IPA_OBJS): Add remote-utils-ipa.o.
9859 ($(IPA_LIB)): Link -ldl and -lpthread.
9860 (UST_CFLAGS): New.
9861 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9862 * config.in, configure: Regenerate.
9863
9864 2010-06-20 Ian Lance Taylor <iant@google.com>
9865 Pedro Alves <pedro@codesourcery.com>
9866
9867 * linux-x86-low.c (always_true): Delete.
9868 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9869 trying to fool the compiler with always_true.
9870
9871 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9872
9873 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9874 conditions in gdbserver.
9875
9876 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9877
9878 * spu-low.c (spu_read_memory): Wrap around local store limit.
9879 (spu_write_memory): Likewise.
9880
9881 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9882
9883 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9884 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9885 LONGEST uses.
9886 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9887 uses.
9888 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9889 uses with LONGEST uses.
9890
9891 2010-06-14 Stan Shebs <stan@codesourcery.com>
9892 Pedro Alves <pedro@codesourcery.com>
9893
9894 Bytecode compiler.
9895
9896 * linux-x86-low.c: Include limits.h.
9897 (add_insns): New.
9898 (always_true): New.
9899 (EMIT_ASM): New.
9900 (EMIT_ASM32): New.
9901 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9902 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9903 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9904 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9905 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9906 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9907 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9908 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9909 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9910 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9911 (amd64_emit_void_call_2): New.
9912 (amd64_emit_ops): New.
9913 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9914 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9915 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9916 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9917 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9918 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9919 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9920 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9921 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9922 (i386_emit_stack_adjust, i386_emit_int_call_1)
9923 (i386_emit_void_call_2): New.
9924 (i386_emit_ops): New.
9925 (x86_emit_ops): New.
9926 (the_low_target): Install x86_emit_ops.
9927 * server.h (struct emit_ops): New.
9928 (get_raw_reg_func_addr): Declare.
9929 (current_insn_ptr, emit_error): Declare.
9930 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9931 (set_trace_state_variable_value): New defines.
9932 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9933 addr_get_trace_state_variable_value and
9934 addr_set_trace_state_variable_value.
9935 (symbol_list): New fields for get_raw_reg,
9936 get_trace_state_variable_value and set_trace_state_variable_value.
9937 (condfn): New typedef.
9938 (struct tracepoint): New field `compiled_cond'.
9939 (do_action_at_tracepoint): Clear compiled_cond.
9940 (get_trace_state_variable_value, set_trace_state_variable_value):
9941 Export in the IPA.
9942 (condition_true_at_tracepoint): If there's a compiled condition,
9943 run that.
9944 (current_insn_ptr, emit_error): New globals.
9945 (struct bytecode_address): New.
9946 (get_raw_reg_func_addr): New.
9947 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9948 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9949 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9950 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9951 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9952 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9953 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9954 (compile_tracepoint_condition, compile_bytecodes): New.
9955 * target.h (emit_ops): Forward declare.
9956 (struct target_ops): New field emit_ops.
9957 (target_emit_ops): New.
9958 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9959 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9960 * linux-low.c (linux_emit_ops): New.
9961 (linux_target_ops): Install it.
9962 * linux-low.h (struct linux_target_ops): New field emit_ops.
9963
9964 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9965
9966 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9967 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9968
9969 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9970 Stan Shebs <stan@codesourcery.com>
9971
9972 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9973 (all): Depend on $(extra_libraries).
9974 (install-only): Install the IPA.
9975 (IPA_OBJS, IPA_LIB): New.
9976 (clean): Remove the IPA lib.
9977 (IPAGENT_CFLAGS): New.
9978 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9979 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9980 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9981 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9982 * configure.ac: Check for atomic builtins support in the compiler.
9983 (IPA_DEPFILES, extra_libraries): Define.
9984 * configure.srv (ipa_obj): Add description.
9985 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9986 (i[34567]86-*-linux*): Set ipa_obj.
9987 (x86_64-*-linux*): Set ipa_obj.
9988 * linux-low.c (stabilizing_threads): New.
9989 (supports_fast_tracepoints): New.
9990 (linux_detach): Stabilize threads before detaching.
9991 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9992 the lwp is either not stabilizing, or is moving out of a jump pad.
9993 (linux_fast_tracepoint_collecting): New.
9994 (maybe_move_out_of_jump_pad): New.
9995 (enqueue_one_deferred_signal): New.
9996 (dequeue_one_deferred_signal): New.
9997 (linux_wait_for_event_1): If moving out of a jump pad, defer
9998 pending signals to later.
9999 (linux_stabilize_threads): New.
10000 (linux_wait_1): Check if threads need moving out of jump pads, and
10001 do it if so.
10002 (stuck_in_jump_pad_callback): New.
10003 (move_out_of_jump_pad_callback): New.
10004 (lwp_running): New.
10005 (linux_resume_one_lwp): Handle moving out of jump pads.
10006 (linux_set_resume_request): Dequeue deferred signals.
10007 (need_step_over_p): Also step over fast tracepoint jumps.
10008 (start_step_over): Also uninsert fast tracepoint jumps.
10009 (finish_step_over): Also reinsert fast tracepoint jumps.
10010 (linux_install_fast_tracepoint_jump): New.
10011 (linux_target_ops): Install linux_stabilize_threads and
10012 linux_install_fast_tracepoint_jump_pad.
10013 * linux-low.h (linux_target_ops) <get_thread_area,
10014 install_fast_tracepoint_jump_pad>: New fields.
10015 (struct lwp_info) <collecting_fast_tracepoint,
10016 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10017 (linux_get_thread_area): Declare.
10018 * linux-x86-low.c (jump_insn): New.
10019 (x86_get_thread_area): New.
10020 (append_insns): New.
10021 (push_opcode): New.
10022 (amd64_install_fast_tracepoint_jump_pad): New.
10023 (i386_install_fast_tracepoint_jump_pad): New.
10024 (x86_install_fast_tracepoint_jump_pad): New.
10025 (the_low_target): Install x86_get_thread_area and
10026 x86_install_fast_tracepoint_jump_pad.
10027 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10028 (struct fast_tracepoint_jump): New.
10029 (fast_tracepoint_jump_insn): New.
10030 (fast_tracepoint_jump_shadow): New.
10031 (find_fast_tracepoint_jump_at): New.
10032 (fast_tracepoint_jump_here): New.
10033 (delete_fast_tracepoint_jump): New.
10034 (set_fast_tracepoint_jump): New.
10035 (uninsert_fast_tracepoint_jumps_at): New.
10036 (reinsert_fast_tracepoint_jumps_at): New.
10037 (set_breakpoint_at): Use write_inferior_memory.
10038 (uninsert_raw_breakpoint): Use write_inferior_memory.
10039 (check_mem_read): Mask out fast tracepoint jumps.
10040 (check_mem_write): Mask out fast tracepoint jumps.
10041 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10042 (set_fast_tracepoint_jump): Declare.
10043 (delete_fast_tracepoint_jump)
10044 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10045 (reinsert_fast_tracepoint_jumps_at): Declare.
10046 * regcache.c: Don't compile many functions when building the
10047 in-process agent library.
10048 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10049 the register buffer in the heap.
10050 (free_register_cache): If the register buffer isn't owned by the
10051 regcache, don't free it.
10052 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10053 pre-existing register caches.
10054 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10055 type.
10056 (convert_ascii_to_int): : Constify `from' parameter type.
10057 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10058 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10059 the needed buffer in-place.
10060 (relocate_instruction): New.
10061 * server.c (handle_query) <qSymbols>: If the target supports
10062 tracepoints, give it a chance of looking up symbols. Report
10063 support for fast tracepoints.
10064 (handle_status): Stabilize threads.
10065 (process_serial_event): Adjust.
10066 * server.h (struct fast_tracepoint_jump): Forward declare.
10067 (struct process_info) <fast_tracepoint_jumps>: New field.
10068 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10069 (decode_X_packet, decode_M_packet): Adjust.
10070 (relocate_instruction): Declare.
10071 (in_process_agent_loaded): Declare.
10072 (tracepoint_look_up_symbols): Declare.
10073 (struct fast_tpoint_collect_status): Declare.
10074 (fast_tracepoint_collecting): Declare.
10075 (force_unlock_trace_buffer): Declare.
10076 (handle_tracepoint_bkpts): Declare.
10077 (initialize_low_tracepoint)
10078 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10079 * target.h (struct target_ops) <stabilize_threads,
10080 install_fast_tracepoint_jump_pad>: New fields.
10081 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10082 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10083 [HAVE_STDINT_H]: Include stdint.h.
10084 (trace_debug_1): Rename to ...
10085 (trace_vdebug): ... this.
10086 (trace_debug): Rename to ...
10087 (trace_debug_1): ... this. Add `level' parameter.
10088 (trace_debug): New.
10089 (ATTR_USED, ATTR_NOINLINE): New.
10090 (IP_AGENT_EXPORT): New.
10091 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10092 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10093 (about_to_request_buffer_space, trace_buffer_is_full)
10094 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10095 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10096 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10097 (traceframe_write_count, traceframes_created)
10098 (trace_state_variables)
10099 New renaming defines.
10100 (struct ipa_sym_addresses): New.
10101 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10102 (symbol_list): New.
10103 (ipa_sym_addrs): New.
10104 (all_tracepoint_symbols_looked_up): New.
10105 (in_process_agent_loaded): New.
10106 (write_e_ipa_not_loaded): New.
10107 (maybe_write_ipa_not_loaded): New.
10108 (tracepoint_look_up_symbols): New.
10109 (debug_threads) [IN_PROCESS_AGENT]: New.
10110 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10111 (UNKNOWN_SIDE_EFFECTS): New.
10112 (stop_tracing): New.
10113 (flush_trace_buffer): New.
10114 (stop_tracing_bkpt): New.
10115 (flush_trace_buffer_bkpt): New.
10116 (read_inferior_integer): New.
10117 (read_inferior_uinteger): New.
10118 (read_inferior_data_pointer): New.
10119 (write_inferior_data_pointer): New.
10120 (write_inferior_integer): New.
10121 (write_inferior_uinteger): New.
10122 (struct collect_static_trace_data_action): Delete.
10123 (enum tracepoint_type): New.
10124 (struct tracepoint) <type>: New field `type'.
10125 <actions_str, step_actions, step_actions_str>: Only include in
10126 GDBserver.
10127 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10128 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10129 (tracepoints): Use IP_AGENT_EXPORT.
10130 (last_tracepoint): Don't include in the IPA.
10131 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10132 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10133 (alloced_trace_state_variables): New.
10134 (trace_state_variables): Use IP_AGENT_EXPORT.
10135 (traceframe_t): Delete unused variable.
10136 (circular_trace_buffer): Don't include in the IPA.
10137 (trace_buffer_start): Delete.
10138 (struct trace_buffer_control): New.
10139 (trace_buffer_free): Delete.
10140 (struct ipa_trace_buffer_control): New.
10141 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10142 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10143 New.
10144 (trace_buffer_ctrl): New.
10145 (TRACE_BUFFER_CTRL_CURR): New.
10146 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10147 Reimplement as macros.
10148 (trace_buffer_wrap): Delete.
10149 (traceframe_write_count, traceframe_read_count)
10150 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10151 (struct tracepoint_hit_ctx) <type>: New field.
10152 (struct fast_tracepoint_ctx): New.
10153 (memory_barrier): New.
10154 (cmpxchg): New.
10155 (record_tracepoint_error): Update atomically in the IPA.
10156 (clear_inferior_trace_buffer): New.
10157 (about_to_request_buffer_space): New.
10158 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10159 updating the same buffer.
10160 (add_tracepoint): Default the tracepoint's type to trap
10161 tracepoint, and orig_size to -1.
10162 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10163 internal variables.
10164 (create_trace_state_variable): New parameter `gdb'. Handle it.
10165 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10166 (cmd_qtdp): Handle fast tracepoints.
10167 (cmd_qtdv): Adjust.
10168 (max_jump_pad_size): New.
10169 (gdb_jump_pad_head): New.
10170 (get_jump_space_head): New.
10171 (claim_jump_space): New.
10172 (sort_tracepoints): New.
10173 (MAX_JUMP_SIZE): New.
10174 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10175 IPA.
10176 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10177 support. Upload fast traceframes, and delete internal IPA
10178 breakpoints.
10179 (stop_tracing_handler): New.
10180 (flush_trace_buffer_handler): New.
10181 (cmd_qtstop): Upload fast tracepoints.
10182 (response_tracepoint): Handle fast tracepoints.
10183 (tracepoint_finished_step): Upload fast traceframes. Set the
10184 tracepoint hit context's tracepoint type.
10185 (handle_tracepoint_bkpts): New.
10186 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10187 type. Add comment about fast tracepoints.
10188 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10189 non-existing action_str field.
10190 (get_context_regcache): Handle fast tracepoints.
10191 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10192 to the regcache.
10193 (fast_tracepoint_from_jump_pad_address): New.
10194 (fast_tracepoint_from_ipa_tpoint_address): New.
10195 (collecting_t): New.
10196 (force_unlock_trace_buffer): New.
10197 (fast_tracepoint_collecting): New.
10198 (collecting): New.
10199 (gdb_collect): New.
10200 (write_inferior_data_ptr): New.
10201 (target_tp_heap): New.
10202 (target_malloc): New.
10203 (download_agent_expr): New.
10204 (UALIGN): New.
10205 (download_tracepoints): New.
10206 (download_trace_state_variables): New.
10207 (upload_fast_traceframes): New.
10208 (IPA_FIRST_TRACEFRAME): New.
10209 (IPA_NEXT_TRACEFRAME_1): New.
10210 (IPA_NEXT_TRACEFRAME): New.
10211 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10212 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10213 (gdb_jump_pad_buffer_end): New.
10214 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10215 (initialize_tracepoint): Adjust.
10216 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10217 buffer. Initialize the low module.
10218 * utils.c (PREFIX, TOOLNAME): New.
10219 (malloc_failure): Use PREFIX.
10220 (error): In the IPA, an error causes an exit.
10221 (fatal, warning): Use PREFIX.
10222 (internal_error): Use TOOLNAME.
10223 (NUMCELLS): Increase to 10.
10224 * configure, config.in: Regenerate.
10225
10226 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10227
10228 * server.c (handle_query) <qSupported>: Do two passes over the
10229 qSupported string to avoid nesting strtok.
10230
10231 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10232
10233 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10234 (CDEPS): New.
10235 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10236 -Wl,--dynamic-list.
10237 * configure: Regenerate.
10238 * proc-service.list: New.
10239
10240 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10241
10242 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10243 New comment.
10244
10245 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10246
10247 * gdbreplay.c (remote_open): Check error return from socket() call by
10248 its equality to -1 not by it being negative.
10249 * remote-utils.c (remote_open): Likewise.
10250
10251 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10252
10253 * config.h: Regenerate.
10254
10255 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10256
10257 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10258 doesn't provide PTRACE_GET_THREAD_AREA.
10259
10260 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10261
10262 * linux-m68k-low.c: Include <asm/ptrace.h>
10263 (ps_get_thread_area): Implement.
10264
10265 2010-05-03 Doug Evans <dje@google.com>
10266
10267 * event-loop.c (struct callback_event): New struct.
10268 (callback_list): New global.
10269 (append_callback_event, delete_callback_event): New functions.
10270 (process_callback): New function.
10271 (start_event_loop): Call it.
10272 * remote-utils.c (NOT_SCHEDULED): Define.
10273 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10274 moved out of readchar.
10275 (readchar): Rewrite. Call reschedule before returning.
10276 (reset_readchar): New function.
10277 (remote_close): Call it.
10278 (process_remaining, reschedule): New functions.
10279 * server.h (callback_handler_func): New typedef.
10280 (append_callback_event, delete_callback_event): Declare.
10281
10282 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10283
10284 * proc-service.c (ps_pglobal_lookup): Use
10285 thread_db_look_up_one_symbol.
10286 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10287 parameter. Use it instead of all_symbols_looked_up.
10288 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10289 field.
10290 (all_symbols_looked_up): Don't declare.
10291 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10292 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10293 field.
10294 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10295 Set all_symbols_looked_up here.
10296 (thread_db_look_up_one_symbol): New.
10297 (thread_db_get_tls_address): Adjust.
10298 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10299 thread_db object on the heap, and tentatively set it in the
10300 process structure.
10301 (thread_db_init): Don't set all_symbols_looked_up here.
10302 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10303
10304 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10305
10306 * linux-low.c (linux_kill, linux_detach): Adjust.
10307 (status_pending_p_callback): Remove redundant statement. Check
10308 for !TARGET_WAITIKIND_IGNORE, instead of
10309 TARGET_WAITKIND_STOPPED.
10310 (handle_tracepoints): Make sure LWP is locked. Adjust.
10311 (linux_wait_for_event_1): Adjust.
10312 (linux_cancel_breakpoints): New.
10313 (unsuspend_one_lwp): New.
10314 (unsuspend_all_lwps): New.
10315 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10316 (send_sigstop_callback): Change return type to int, add new
10317 `except' parameter and handle it.
10318 (suspend_and_send_sigstop_callback): New.
10319 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10320 pass them down. If SUSPEND, also increment the lwp's suspend
10321 count.
10322 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10323 (need_step_over_p): Don't consider suspended LWPs.
10324 (start_step_over): Adjust.
10325 (proceed_one_lwp): Change return type to int, add new `except'
10326 parameter and handle it.
10327 (unsuspend_and_proceed_one_lwp): New.
10328 (proceed_all_lwps): Use find_inferior instead of
10329 for_each_inferior.
10330 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10331 also decrement the suspend count of LWPs. Pass `except' down,
10332 instead of hacking its suspend count.
10333 (linux_pause_all): Add `freeze' parameter. Adjust.
10334 (linux_unpause_all): New.
10335 (linux_target_ops): Install linux_unpause_all.
10336 * server.c (handle_status): Adjust.
10337 * target.h (struct target_ops): New fields `unpause_all' and
10338 `cancel_breakpoints'. Add new parameter to `pause_all'.
10339 (pause_all): Add new `freeze' parameter.
10340 (unpause_all): New.
10341 (cancel_breakpoints): New.
10342 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10343 cancel breakpoints.
10344 (cmd_qtstart): Pause threads.
10345 (stop_tracing): Pause threads, and cancel breakpoints.
10346 * win32-low.c (win32_target_ops): Adjust.
10347
10348 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10349
10350 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10351 the inferior right away from here...
10352 (linux_wait_1): ... to here, and adjust to check the thread's
10353 last_resume_kind instead of the lwp's step or stop_expected flags.
10354
10355 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10356
10357 * README: Use consistent `GDB' and `GDBserver' spellings.
10358
10359 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10360
10361 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10362 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10363 (linux_detach_one_lwp): Assume the lwp is stopped.
10364 (any_thread_of): Delete.
10365 (linux_detach): Stop all lwps here. Don't blindly delete all
10366 breakpoints.
10367 (delete_lwp_callback): New.
10368 (linux_mourn): Delete all lwps of the process that is gone.
10369 (linux_wait_1): Don't delete the last lwp of the process here.
10370 * mem-break.h (mark_breakpoints_out): Declare.
10371 * mem-break.c (mark_breakpoints_out): New.
10372 (free_all_breakpoints): Use it.
10373 * server.c (handle_target_event): If the process is gone, mark
10374 breakpoints out.
10375 * thread-db.c (struct thread_db) <create_bp>: New field.
10376 (thread_db_enable_reporting): Fix prototype. Store a thread event
10377 breakpoint reference in the thread_db struct.
10378 (thread_db_load_search): Clear the thread_db object.
10379 (try_thread_db_load_1): Ditto.
10380 (switch_to_process): New.
10381 (disable_thread_event_reporting): Use it.
10382 (remove_thread_event_breakpoints): New.
10383 (thread_db_detach, thread_db_mourn): Use it.
10384
10385 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10386
10387 * linux-low.c (linux_enable_event_reporting): New.
10388 (linux_wait_for_event_1, handle_extended_wait): Use it.
10389
10390 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10391
10392 * linux-low.c (linux_kill_one_lwp, linux_kill)
10393 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10394 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10395 SIGSTOP even if the LWP is stopped.
10396 (send_sigstop_callback): New.
10397 (stop_all_lwps): Use send_sigstop_callback instead.
10398 (linux_resume_one_thread): Adjust.
10399 (proceed_one_lwp): Still proceed an LWP that the client has
10400 requested to stop, if we haven't reported it as stopped yet. Make
10401 sure that LWPs the client want stopped, have a pending SIGSTOP.
10402
10403 2010-04-26 Doug Evans <dje@google.com>
10404
10405 * server.c (handle_general_set): Make static.
10406
10407 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10408 Print received char after testing for error/eof instead of before.
10409 (input_interrupt): Tweak comment.
10410
10411 2010-04-23 Doug Evans <dje@google.com>
10412
10413 * server.c (start_inferior): Print inferior argv if --debug.
10414
10415 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10416
10417 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10418 * nto-x86-low.c: Include server.h
10419
10420 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10421
10422 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10423 be consistent with other sources of this directory.
10424 (init_registers_amd64): Correct name of source file of this function
10425 in the comment.
10426
10427 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10428
10429 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10430 64-bit executables.
10431
10432 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10433
10434 * win32-i386-low.c: Add 64-bit support.
10435 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10436 (init_registers_amd64): Declare.
10437 (mappings): Add 64-bit version of array.
10438 (init_windows_x86): New function.
10439 (the_low_target): Change init_arch field to init_windows_x86.
10440
10441 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10442
10443 * win32-low.c: Adapt to support also 64-bit architecture.
10444 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10445 (get_image_name): Use SIZE_T type for local variable `done'.
10446 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10447 (toolhelp_get_dll_name): Idem.
10448 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10449 Use uintptr_t typecast to avoid warning.
10450 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10451 (handle_exception): Use phex_nz to avoid warning.
10452 (win32_wait): Remove unused local variable `process'.
10453
10454 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10455
10456 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10457 `amd64-avx.o'.
10458
10459 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10460
10461 * configure.ac: Use `ws2_32' library for srv_mingw.
10462 * configure: Regenerate.
10463 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10464 * remote-utils.c: Likewise.
10465
10466 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10467
10468 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10469 if __x86_64__ is defined.
10470
10471 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10472
10473 * configure: Regenerate.
10474
10475 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10476
10477 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10478 * target.h (target_ops): New get_tib_address field.
10479 * win32-low.h (win32_thread_info): Add thread_local_base field.
10480 * win32-low.c (child_add_thread): Add tlb argument.
10481 Set thread_local_base field to TLB.
10482 (get_child_debug_event): Adapt to child_add_thread change.
10483 (win32_get_tib_address): New function.
10484 (win32_target_ops): Set get_tib_address field to
10485 win32_get_tib_address.
10486 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10487
10488 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10489
10490 * linux-low.c (linux_mourn): Also remove the process.
10491 * server.c (handle_target_event): Don't remove the process here.
10492 * nto-low.c (nto_mourn): New.
10493 (nto_target_ops): Install it.
10494 * spu-low.c (spu_mourn): New.
10495 (spu_target_ops): Install it.
10496 * win32-low.c (win32_mourn): New.
10497 (win32_target_ops): Install it.
10498
10499 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10500
10501 * server.h (buffer_xml_printf): Remove redundant `;'.
10502
10503 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10504
10505 * regcache.c (set_register_cache): Invalidate regcaches before
10506 changing the register cache layout.
10507 (regcache_invalidate_one): Allow a NULL regcache.
10508 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10509 regcaches before changing the register cache layout or the target
10510 regsets.
10511
10512 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10513
10514 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10515 variable warning on Linux/x86-64.
10516
10517 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10518
10519 GDBserver disconnected tracing support.
10520
10521 * linux-low.c (linux_remove_process): Delete.
10522 (add_lwp): Don't set last_resume_kind here.
10523 (linux_kill): Use `mourn'.
10524 (linux_detach): Use `thread_db_detach', and `mourn'.
10525 (linux_mourn): New.
10526 (linux_attach_lwp_1): Adjust comment.
10527 (linux_attach): last_resume_kind moved the thread_info; adjust.
10528 (status_pending_p_callback): Adjust.
10529 (linux_wait_for_event_1): Adjust.
10530 (count_events_callback, select_singlestep_lwp_callback)
10531 (select_event_lwp_callback, cancel_breakpoints_callback)
10532 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10533 (proceed_one_lwp): Adjust.
10534 (linux_async): Add debug output.
10535 (linux_thread_stopped): New.
10536 (linux_pause_all): New.
10537 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10538 linux_pause_all.
10539 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10540 (thread_db_free): Delete declaration.
10541 (thread_db_detach, thread_db_mourn): Declare.
10542 * thread-db.c (thread_db_init): Use thread_db_mourn.
10543 (thread_db_free): Delete, split in two.
10544 (disable_thread_event_reporting): New.
10545 (thread_db_detach): New.
10546 (thread_db_mourn): New.
10547
10548 * server.h (struct thread_info) <last_resume_kind>: New field.
10549 <attached>: Add comment.
10550 <gdb_detached>: New field.
10551 (handler_func): Change return type to int.
10552 (handle_serial_event, handle_target_event): Ditto.
10553 (gdb_connected): Declare.
10554 (tracing): Delete.
10555 (disconnected_tracing): Declare.
10556 (stop_tracing): Declare.
10557
10558 * server.c (handle_query) <qSupported>: Report support for
10559 disconnected tracing.
10560 (queue_stop_reply_callback): Account for running threads.
10561 (gdb_wants_thread_stopped): New.
10562 (gdb_wants_all_threads_stopped): New.
10563 (gdb_reattached_process): New.
10564 (handle_status): Clear the `gdb_detached' flag of all processes.
10565 In all-stop, stop all threads.
10566 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10567 (process_serial_event): If the remote connection breaks, or if an
10568 exit was forced with "monitor exit", force an event loop exit.
10569 Handle disconnected tracing on detach.
10570 (handle_serial_event): Adjust.
10571 (handle_target_event): If GDB isn't connected, forward events back
10572 to the inferior, unless the last process exited, in which case,
10573 exit gdbserver. Adjust interface.
10574
10575 * remote-utils.c (remote_open): Don't block in accept. Instead
10576 register an event loop source on the listen socket file
10577 descriptor. Refactor bits into ...
10578 (listen_desc): ... this new global.
10579 (gdb_connected): ... this new function.
10580 (enable_async_notification): ... this new function.
10581 (handle_accept_event): ... this new function.
10582 (remote_close): Clear remote_desc.
10583
10584 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10585
10586 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10587 New fields.
10588 (mourn_inferior): Define.
10589 (target_process_qsupported): Avoid the dangling else problem.
10590 (thread_stopped): Define.
10591 (pause_all): Define.
10592 (target_waitstatus_to_string): Declare.
10593 * target.c (target_waitstatus_to_string): New.
10594
10595 * tracepoint.c (tracing): Make extern.
10596 (disconnected_tracing): New.
10597 (stop_tracing): Make extern. Handle tracing stops due to GDB
10598 disconnecting.
10599 (cmd_qtdisconnected): New.
10600 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10601 (handle_tracepoint_general_set): Handle QTDisconnected.
10602
10603 * event-loop.c (event_handler_func): Change return type to int.
10604 (process_event): Bail out if the event handler wants the event
10605 loop to stop.
10606 (handle_file_event): Ditto.
10607 (start_event_loop): Bail out if the event handler wants the event
10608 loop to stop.
10609
10610 * nto-low.c (nto_target_ops): Adjust.
10611 * spu-low.c (spu_wait): Don't remove the process here.
10612 (spu_target_ops): Adjust.
10613 * win32-low.c (win32_wait): Don't remove the process here.
10614 (win32_target_ops): Adjust.
10615
10616 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10617
10618 * regcache.c (realloc_register_cache): Invalidate inferior's
10619 regcache before recreating it.
10620
10621 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10622
10623 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10624
10625 2010-04-09 Stan Shebs <stan@codesourcery.com>
10626 Pedro Alves <pedro@codesourcery.com>
10627
10628 * server.h (LONGEST): New.
10629 (struct thread_info) <while_stepping>: New field.
10630 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10631 Declare.
10632 (initialize_tracepoint, handle_tracepoint_general_set)
10633 (handle_tracepoint_query, tracepoint_finished_step)
10634 (tracepoint_was_hit, release_while_stepping_state_list):
10635 (current_traceframe): Declare.
10636 * server.c (handle_general_set): Handle tracepoint packets.
10637 (read_memory): New.
10638 (write_memory): New.
10639 (handle_search_memory_1): Use read_memory.
10640 (handle_query): Report support for conditional tracepoints, trace
10641 state variables, and tracepoint sources. Handle tracepoint
10642 queries.
10643 (main): Initialize the tracepoints module.
10644 (process_serial_event): Handle traceframe reads/writes.
10645
10646 * linux-low.c (handle_tracepoints): New.
10647 (linux_wait_1): Call it.
10648 (linux_resume_one_lwp): Handle while-stepping.
10649 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10650 (linux_target_ops): Install them.
10651 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10652 New field.
10653 * linux-x86-low.c (x86_supports_tracepoints): New.
10654 (the_low_target). Install it.
10655
10656 * mem-break.h (delete_breakpoint): Declare.
10657 * mem-break.c (delete_breakpoint): Make external.
10658
10659 * target.h (struct target_ops): Add `supports_tracepoints',
10660 `read_pc', and `write_pc' fields.
10661 (target_supports_tracepoints): Define.
10662 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10663 (phex_nz): New.
10664
10665 * regcache.h (struct regcache) <registers_owned>: New field.
10666 (init_register_cache, regcache_cpy): Declare.
10667 (regcache_read_pc, regcache_write_pc): Declare.
10668 (register_cache_size): Declare.
10669 (supply_regblock): Declare.
10670 * regcache.c (init_register_cache): New.
10671 (new_register_cache): Use it.
10672 (regcache_cpy): New.
10673 (register_cache_size): New.
10674 (supply_regblock): New.
10675 (regcache_read_pc, regcache_write_pc): New.
10676
10677 * tracepoint.c: New.
10678
10679 * Makefile.in (OBS): Add tracepoint.o.
10680 (tracepoint.o): New rule.
10681
10682 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10683
10684 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10685 (i386-mmx.o): New.
10686 (i386-mmx.c): Likewise.
10687 (i386-mmx-linux.o): Likewise.
10688 (i386-mmx-linux.c): Likewise.
10689
10690 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10691 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10692 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10693 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10694
10695 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10696 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10697 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10698
10699 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10700
10701 * Makefile.in (clean): Updated.
10702 (i386-avx.o): New.
10703 (i386-avx.c): Likewise.
10704 (i386-avx-linux.o): Likewise.
10705 (i386-avx-linux.c): Likewise.
10706 (amd64-avx.o): Likewise.
10707 (amd64-avx.c): Likewise.
10708 (amd64-avx-linux.o): Likewise.
10709 (amd64-avx-linux.c): Likewise.
10710
10711 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10712 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10713 (srv_amd64_regobj): Add amd64-avx.o.
10714 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10715 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10716 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10717 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10718 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10719 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10720 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10721
10722 * i387-fp.c: Include "i386-xstate.h".
10723 (i387_xsave): New.
10724 (i387_cache_to_xsave): Likewise.
10725 (i387_xsave_to_cache): Likewise.
10726 (x86_xcr0): Likewise.
10727
10728 * i387-fp.h (i387_cache_to_xsave): Likewise.
10729 (i387_xsave_to_cache): Likewise.
10730 (x86_xcr0): Likewise.
10731
10732 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10733 * linux-crisv32-low.c (target_regsets): Likewise.
10734 * linux-m68k-low.c (target_regsets): Likewise.
10735 * linux-mips-low.c (target_regsets): Likewise.
10736 * linux-ppc-low.c (target_regsets): Likewise.
10737 * linux-s390-low.c (target_regsets): Likewise.
10738 * linux-sh-low.c (target_regsets): Likewise.
10739 * linux-sparc-low.c (target_regsets): Likewise.
10740 * linux-xtensa-low.c (target_regsets): Likewise.
10741
10742 * linux-low.c: Include <sys/uio.h>.
10743 (regsets_fetch_inferior_registers): Support nt_type.
10744 (regsets_store_inferior_registers): Likewise.
10745 (linux_process_qsupported): New.
10746 (linux_target_ops): Add linux_process_qsupported.
10747
10748 * linux-low.h (regset_info): Add nt_type.
10749 (linux_target_ops): Add process_qsupported.
10750
10751 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10752 and <sys/uio.h>.
10753 (init_registers_i386_avx_linux): New.
10754 (init_registers_amd64_avx_linux): Likewise.
10755 (xmltarget_i386_linux_no_xml): Likewise.
10756 (xmltarget_amd64_linux_no_xml): Likewise.
10757 (PTRACE_GETREGSET): Likewise.
10758 (PTRACE_SETREGSET): Likewise.
10759 (x86_fill_xstateregset): Likewise.
10760 (x86_store_xstateregset): Likewise.
10761 (use_xml): Likewise.
10762 (x86_linux_update_xmltarget): Likewise.
10763 (x86_linux_process_qsupported): Likewise.
10764 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10765 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10766 init_registers_i386_linux here. Call
10767 x86_linux_update_xmltarget.
10768 (the_low_target): Add x86_linux_process_qsupported.
10769
10770 * server.c (handle_query): Call target_process_qsupported.
10771
10772 * target.h (target_ops): Add process_qsupported.
10773 (target_process_qsupported): New.
10774
10775 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10776
10777 * inferiors.c (add_thread): Set last_status kind to
10778 TARGET_WAITKIND_IGNORE.
10779 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10780 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10781 (linux_wait_1): Move `thread' local definition to block that uses
10782 it. Don't NULL initialize `event_child'.
10783 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10784 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10785 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10786
10787 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10788
10789 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10790 an extended waitstatus, or by a watchpoint.
10791 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10792 thread was stepping or has been stopped by a watchpoint.
10793
10794 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10795
10796 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10797 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10798 of another, then delete the previous, and validate all
10799 breakpoints.
10800 (validate_inserted_breakpoint): New.
10801 (delete_disabled_breakpoints): New.
10802 (validate_breakpoints): New.
10803 (check_mem_read): Validate breakpoints before trusting their
10804 shadow. Delete disabled breakpoints.
10805 (check_mem_write): Validate breakpoints before trusting they
10806 should be inserted. Delete disabled breakpoints.
10807 * mem-break.h (validate_breakpoints):
10808 * server.c (handle_query): Validate breakpoints when we see a
10809 qSymbol query.
10810
10811 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10812
10813 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10814 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10815 if we could tell there's a GDB breakpoint at stop_pc.
10816 (need_step_over_p): Don't do a step over if we find a GDB
10817 breakpoint at the resume PC.
10818
10819 * mem-break.c (struct raw_breakpoint): New.
10820 (enum bkpt_type): New type `gdb_breakpoint'.
10821 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10822 fields. New field `raw'.
10823 (find_raw_breakpoint_at): New.
10824 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10825 breakpoint instead.
10826 (set_breakpoint_at): Adjust.
10827 (delete_raw_breakpoint): New.
10828 (release_breakpoint): New.
10829 (delete_breakpoint): Rename to...
10830 (delete_breakpoint_1): ... this. Add proc parameter. Use
10831 release_breakpoint. Return ENOENT.
10832 (delete_breakpoint): Reimplement.
10833 (find_breakpoint_at): Delete.
10834 (find_gdb_breakpoint_at): New.
10835 (delete_breakpoint_at): Delete.
10836 (set_gdb_breakpoint_at): New.
10837 (delete_gdb_breakpoint_at): New.
10838 (gdb_breakpoint_here): New.
10839 (set_reinsert_breakpoint): Use release_breakpoint.
10840 (uninsert_breakpoint): Rename to ...
10841 (uninsert_raw_breakpoint): ... this.
10842 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10843 (reinsert_raw_breakpoint): Change parameter type to
10844 raw_breakpoint.
10845 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10846 instead.
10847 (check_breakpoints): Adjust. Use release_breakpoint.
10848 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10849 (breakpoint_inserted_here): Ditto.
10850 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10851 Don't trust the breakpoint's shadow if it is not inserted.
10852 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10853 (delete_all_breakpoints): Adjust.
10854 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10855 use delete_breakpoint_1.
10856
10857 * mem-break.h (breakpoints_supported): Delete declaration.
10858 (set_gdb_breakpoint_at): Declare.
10859 (gdb_breakpoint_here): Declare.
10860 (delete_breakpoint_at): Delete.
10861 (delete_gdb_breakpoint_at): Declare.
10862
10863 * server.h (struct raw_breakpoint): Forward declare.
10864 (struct process_info): New field `raw_breakpoints'.
10865
10866 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10867 breakpoints.
10868
10869 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10870
10871 * linux-low.c (status_pending_p_callback): Fix comment.
10872 (linux_wait_for_event_1): Move most of the internal breakpoint
10873 handling from here...
10874 (linux_wait_1): ... to here.
10875 (count_events_callback): New.
10876 (select_singlestep_lwp_callback): New.
10877 (select_event_lwp_callback): New.
10878 (cancel_breakpoints_callback): New.
10879 (select_event_lwp): New.
10880 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10881 priority to all LWPs that have had events that should be reported
10882 to the client. Cancel breakpoints when about to reporting the
10883 event to the client, not while stopping lwps. No longer cancel
10884 finished single-steps here.
10885 (cancel_finished_single_step): Delete.
10886 (cancel_finished_single_steps): Delete.
10887
10888 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10889
10890 * mem-break.c (enum bkpt_type): New.
10891 (struct breakpoint): New field `type'.
10892 (set_breakpoint_at): Change return type to struct breakpoint
10893 pointer. Set type to `other_breakpoint' by default.
10894 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10895 in the breakpoint list.
10896 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10897 (reinsert_breakpoint): Rename to ...
10898 (reinsert_raw_breakpoint): ... this.
10899 (reinsert_breakpoints_at): Adjust.
10900 * mem-break.h (struct breakpoint): Declare.
10901 (set_breakpoint_at): Change return type to struct breakpoint
10902 pointer.
10903
10904 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10905
10906 * server.c (handle_query): Assign, not compare.
10907
10908 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10909
10910 Teach linux gdbserver to step-over-breakpoints.
10911
10912 * linux-low.c (can_hardware_single_step): New.
10913 (supports_breakpoints): New.
10914 (handle_extended_wait): If stopping threads, read the stop pc of
10915 the new cloned LWP.
10916 (get_pc): New.
10917 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10918 low target doesn't support retrieving the PC.
10919 (add_lwp): Set last_resume_kind to resume_continue.
10920 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10921 (linux_attach): Don't clear stop_expected. Set the lwp's
10922 last_resume_kind to resume_stop.
10923 (linux_detach_one_lwp): Don't check for removed breakpoints.
10924 (check_removed_breakpoint): Delete.
10925 (status_pending_p): Rename to ...
10926 (status_pending_p_callback): ... this. Don't check for removed
10927 breakpoints. Don't consider threads that are stopped from GDB's
10928 perspective.
10929 (linux_wait_for_lwp): Always read the stop_pc here.
10930 (cancel_breakpoint): New.
10931 (step_over_bkpt): New global.
10932 (linux_wait_for_event_1): Implement stepping over breakpoints.
10933 (gdb_wants_lwp_stopped): New.
10934 (gdb_wants_all_stopped): New.
10935 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10936 single-step traps here. Store the thread's last reported target
10937 wait status.
10938 (send_sigstop): Don't clear stop_expected. Always set it,
10939 instead.
10940 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10941 (cancel_finished_single_step): New.
10942 (cancel_finished_single_steps): New.
10943 (wait_for_sigstop): Don't cancel finished single-step traps here.
10944 (linux_resume_one_lwp): Don't check for removed breakpoints.
10945 Don't set `step' on non-hardware step archs.
10946 (linux_set_resume_request): Ignore resume_stop requests if already
10947 stopping or stopped. Set the lwp's last_resume_kind.
10948 (resume_status_pending_p): Don't check for removed breakpoints.
10949 (need_step_over_p): New.
10950 (start_step_over): New.
10951 (finish_step_over): New.
10952 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10953 requests. Clear the thread's last reported target waitstatus.
10954 Don't use the `suspended' flag. Don't consider pending breakpoints.
10955 (linux_resume): Start a step-over if necessary.
10956 (proceed_one_lwp): New.
10957 (proceed_all_lwps): New.
10958 (unstop_all_lwps): New.
10959 * linux-low.h (struct lwp_info): Rewrite comment for the
10960 `suspended' flag. Add the `stop_pc' field. Delete the
10961 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10962 Add `'last_resume_kind' and `need_step_over' fields.
10963 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10964 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10965 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10966 (set_raw_breakpoint_at): New.
10967 (set_breakpoint_at): Rewrite to use it.
10968 (reinsert_breakpoint_handler): Delete.
10969 (set_reinsert_breakpoint): New.
10970 (reinsert_breakpoint_by_bp): Delete.
10971 (delete_reinsert_breakpoints): New.
10972 (uninsert_breakpoint): Rewrite.
10973 (uninsert_breakpoints_at): New.
10974 (reinsert_breakpoint): Rewrite.
10975 (reinsert_breakpoints_at): New.
10976 (check_breakpoints): Rewrite.
10977 (breakpoint_here): New.
10978 (breakpoint_inserted_here): New.
10979 (check_mem_read): Adjust.
10980 * mem-break.h (breakpoints_supported, breakpoint_here)
10981 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10982 (reinsert_breakpoint_by_bp): Delete declaration.
10983 (delete_reinsert_breakpoints): Declare.
10984 (reinsert_breakpoint): Delete declaration.
10985 (reinsert_breakpoints_at): Declare.
10986 (uninsert_breakpoint): Delete declaration.
10987 (uninsert_breakpoints_at): Declare.
10988 (check_breakpoints): Adjust prototype.
10989 * server.h: Adjust include order.
10990 (struct thread_info): Declare here. Add a `last_status' field.
10991
10992 2010-03-23 Michael Snyder <msnyder@vmware.com>
10993
10994 * server.c (crc32): New function.
10995 (handle_query): Add handling for 'qCRC:' request.
10996
10997 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10998
10999 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11000 lwp had been stopped by a watchpoint.
11001
11002 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11003
11004 * server.h (internal_error): Declare.
11005 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11006 * utils.c (internal_error): New function.
11007
11008 2010-03-15 Andreas Schwab <schwab@redhat.com>
11009
11010 * configure.srv: Fix typo setting srv_regobj.
11011
11012 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11013
11014 * linux-low.c (fetch_register): Avoid passing a non string literal
11015 format to `error'.
11016 (usr_store_inferior_registers): Ditto.
11017
11018 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11019
11020 * linux-low.c (linux_write_memory): Bail out early if peeking
11021 memory failed.
11022
11023 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11024
11025 * linux-low.h (struct lwp_info): New fields
11026 `stopped_by_watchpoint' and `stopped_data_address'.
11027 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11028 here, and cache them in the lwp object.
11029 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11030 directly.
11031 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11032 field.
11033 (linux_stopped_by_watchpoint): Rewrite.
11034 (linux_stopped_data_address): Rewrite.
11035
11036 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11037
11038 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11039 switching the current inferior, not before.
11040
11041 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11042
11043 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11044 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11045 i386-linux.c and amd64-linux.c.
11046 (reg-i386.o): Removed.
11047 (reg-i386.c): Likewise.
11048 (reg-i386-linux.o): Likewise.
11049 (reg-i386-linux.c): Likewise.
11050 (reg-x86-64.o): Likewise.
11051 (reg-x86-64.c): Likewise.
11052 (reg-x86-64-linux.o): Likewise.
11053 (reg-x86-64-linux.c): Likewise.
11054 (i386.o): New.
11055 (i386.c): Likewise.
11056 (i386-linux.o): Likewise.
11057 (i386-linux.c): Likewise.
11058 (amd64.o): Likewise.
11059 (amd64.c): Likewise.
11060 (amd64-linux.o): Likewise.
11061 (amd64-linux.c): Likewise.
11062
11063 * configure.srv (srv_i386_regobj): New.
11064 (srv_i386_linux_regobj): Likewise.
11065 (srv_amd64_regobj): Likewise.
11066 (srv_amd64_linux_regobj): Likewise.
11067 (srv_i386_32bit_xmlfiles): Likewise.
11068 (srv_i386_64bit_xmlfiles): Likewise.
11069 (srv_i386_xmlfiles): Likewise.
11070 (srv_amd64_xmlfiles): Likewise.
11071 (srv_i386_linux_xmlfiles): Likewise.
11072 (srv_amd64_linux_xmlfiles): Likewise.
11073 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11074 srv_xmlfiles to $srv_i386_xmlfiles.
11075 (i[34567]86-*-mingw32ce*): Likewise.
11076 (i[34567]86-*-mingw*): Likewise.
11077 (i[34567]86-*-nto*): Likewise.
11078 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11079 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11080 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11081 (x86_64-*-linux*): Likewise.
11082
11083 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11084 (init_registers_amd64_linux): New.
11085 (x86_arch_setup): Replace init_registers_x86_64_linux with
11086 init_registers_amd64_linux.
11087
11088 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11089
11090 * configure.ac: Check for libdl. If it is not available link against
11091 static libthread_db.
11092 * configure: Regenerate.
11093
11094 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11095
11096 PR9605
11097
11098 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11099 handing a read watchpoint.
11100 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11101
11102 2010-02-12 Doug Evans <dje@google.com>
11103
11104 * linux-low.c (linux_supports_tracefork_flag): Document.
11105 (linux_look_up_symbols): Add comment.
11106
11107 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11108
11109 * regcache.c (supply_register): Clear regcache if buf is NULL.
11110
11111 2010-02-02 Nicolas Roche <roche@sourceware.org>
11112 Joel Brobecker <brobecker@adacore.com>
11113
11114 * inferiors.c (find_inferior): Add function documentation.
11115 (unloaded_dll): Handle the case where the unloaded dll has not
11116 been previously registered in the dll list.
11117
11118 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11119
11120 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11121 (thumb2_breakpoint): New.
11122 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11123
11124 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11125
11126 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11127 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11128 breakpoints.
11129
11130 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11131
11132 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11133
11134 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11135
11136 * linux-s390-low.c (s390_collect_ptrace_register)
11137 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11138
11139 2010-01-21 Doug Evans <dje@google.com>
11140
11141 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11142 (PTRACE_ARG4_TYPE): New macro.
11143 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11144 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11145 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11146 (usr_store_inferior_registers): Ditto.
11147 (linux_read_memory, linux_write_memory): Ditto.
11148 (linux_test_for_tracefork): Ditto.
11149
11150 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11151 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11152
11153 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11154
11155 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11156 target.
11157
11158 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11159
11160 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11161 prototype to take a regcache. Adjust.
11162
11163 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11164
11165 * regcache.h (struct thread_info): Forward declare.
11166 (struct regcache): New.
11167 (new_register_cache): Adjust prototype.
11168 (get_thread_regcache): Declare.
11169 (free_register_cache): Adjust prototype.
11170 (registers_to_string, registers_from_string): Ditto.
11171 (supply_register, supply_register_by_name, collect_register)
11172 (collect_register_as_string, collect_register_by_name): Ditto.
11173 * regcache.c (struct inferior_regcache_data): Delete.
11174 (get_regcache): Rename to ...
11175 (get_thread_regcache): ... this. Adjust. Switch inferior before
11176 fetching registers.
11177 (regcache_invalidate_one): Adjust.
11178 (regcache_invalidate): Fix prototype.
11179 (new_register_cache): Return the new register cache.
11180 (free_register_cache): Change prototype.
11181 (realloc_register_cache): Adjust.
11182 (registers_to_string): Change prototype to take a regcache. Adjust.
11183 (registers_from_string): Ditto.
11184 (register_data): Ditto.
11185 (supply_register): Ditto.
11186 (supply_register_by_name): Ditto.
11187 (collect_register): Ditto.
11188 (collect_register_as_string): Ditto.
11189 (collect_register_by_name): Ditto.
11190 * server.c (process_serial_event): Adjust.
11191 * linux-low.h (regset_fill_func, regset_store_func): Change
11192 prototype.
11193 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11194 Change prototype.
11195 * linux-low.c (get_stop_pc): Adjust.
11196 (check_removed_breakpoint): Adjust.
11197 (linux_wait_for_event): Adjust.
11198 (linux_resume_one_lwp): Adjust.
11199 (fetch_register): Add regcache parameter. Adjust.
11200 (usr_store_inferior_registers): Ditto.
11201 (regsets_fetch_inferior_registers): Ditto.
11202 (regsets_store_inferior_registers): Ditto.
11203 (linux_fetch_registers, linux_store_registers): Ditto.
11204 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11205 regcache. Adjust.
11206 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11207 Ditto.
11208 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11209 prototype to take a regcache.
11210 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11211 * remote-utils.c (convert_ascii_to_int, outreg)
11212 (prepare_resume_reply): Change prototype to take a regcache.
11213 Adjust.
11214 * target.h (struct target_ops) <fetch_registers, store_registers>:
11215 Change prototype to take a regcache.
11216 (fetch_inferior_registers, store_inferior_registers): Change
11217 prototype to take a regcache. Adjust.
11218 * proc-service.c (ps_lgetregs): Adjust.
11219 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11220 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11221 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11222 take a regcache. Adjust.
11223 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11224 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11225 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11226 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11227 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11228 (cris_cannot_fetch_register):
11229 (cris_breakpoint_at): Change prototype to take a regcache.
11230 Adjust.
11231 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11232 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11233 to take a regcache. Adjust.
11234 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11235 Adjust.
11236 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11237 take a regcache. Adjust.
11238 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11239 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11240 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11241 * linux-mips-low.c (mips_get_pc):
11242 (mips_set_pc): Change prototype to take a regcache. Adjust.
11243 (mips_reinsert_addr): Adjust.
11244 (mips_collect_register): Change prototype to take a regcache.
11245 Adjust.
11246 (mips_supply_register):
11247 (mips_collect_register_32bit, mips_supply_register_32bit)
11248 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11249 (mips_store_fpregset): Ditto.
11250 * linux-ppc-low.c (ppc_supply_ptrace_register)
11251 (ppc_supply_ptrace_register): Ditto.
11252 (parse_spufs_run): Adjust.
11253 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11254 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11255 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11256 take a regcache. Adjust.
11257 * linux-s390-low.c (s390_collect_ptrace_register)
11258 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11259 (s390_set_pc): Change prototype to take a regcache. Adjust.
11260 (s390_arch_setup): Adjust.
11261 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11262 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11263 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11264 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11265 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11266 regcache. Adjust.
11267 (sparc_breakpoint_at): Adjust.
11268 * linux-xtensa-low.c (xtensa_fill_gregset):
11269 (xtensa_store_gregset):
11270 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11271 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11272 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11273 prototype to take a regcache. Adjust.
11274 * win32-arm-low.c (arm_fetch_inferior_register)
11275 (arm_store_inferior_register): Change prototype to take a
11276 regcache. Adjust.
11277 * win32-i386-low.c (i386_fetch_inferior_register)
11278 (i386_store_inferior_register): Change prototype to take a
11279 regcache. Adjust.
11280 * win32-low.c (child_fetch_inferior_registers)
11281 (child_store_inferior_registers): Change prototype to take a
11282 regcache. Adjust.
11283 (win32_wait): Adjust.
11284 (win32_fetch_inferior_registers): Change prototype to take a
11285 regcache. Adjust.
11286 (win32_store_inferior_registers): Adjust.
11287 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11288 store_inferior_register>: Change prototype to take a regcache.
11289
11290 2010-01-20 Doug Evans <dje@google.com>
11291
11292 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11293 #ifdef.
11294 (linux_wait_for_event1, linux_init_signals): Ditto.
11295 (W_STOPCODE): Provide definition if missing.
11296
11297 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11298
11299 * linux-low.c (linux_core_of_thread): New.
11300 (compare_ints, show_process, list_threads): New.
11301 (linux_qxfer_osdata): Report threads and cores.
11302 (linux_target_op): Register linux_core_of_thread.
11303 * remote-utils.c (prepare_resume_reply): Report the core.
11304 (buffer_xml_printf): Support %d specifier.
11305 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11306 New.
11307 (handle_query): Handle qXfer:threads. Announce availability
11308 thereof.
11309 * target.h (struct target_ops): New field core_of_thread.
11310
11311 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11312
11313 * Makefile.in (clean): Remove new generated files.
11314 (reg-s390.o, reg-s390.c): Remove rules.
11315 (reg-s390x.o, reg-s390x.c): Likewise.
11316 (s390-linux32.o, s390-linux32.c): Add rules.
11317 (s390-linux64.o, s390-linux64.c): Likewise.
11318 (s390x-linux64.o, s390x-linux64.c): Likewise.
11319 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11320 * linux-s390-low.c: Include <elf.h>.
11321 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11322 (init_registers_s390): Remove prototype.
11323 (init_registers_s390x): Likewise.
11324 (init_registers_s390_linux32): Add prototype.
11325 (init_registers_s390_linux64): Likewise.
11326 (init_registers_s390x_linux64): Likewise.
11327 (s390_num_regs_3264): New define.
11328 (s390_regmap_3264): New global variable.
11329 (s390_cannot_fetch_register): Remove obsolete check.
11330 (s390_cannot_store_register): Likewise.
11331 (s390_collect_ptrace_register): Handle upper/lower register halves.
11332 (s390_supply_ptrace_register): Likewise.
11333 (s390_fill_gregset): Update to register number changes.
11334 (s390_get_hwcap): New routine.
11335 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11336 Install appropriate regmap and register set.
11337
11338 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11339
11340 * server.c (gdbserver_version): Update copyright year to 2010.
11341 * gdbreplay.c (gdbreplay_version): Likewise.
11342
11343 2009-12-28 Doug Evans <dje@google.com>
11344
11345 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11346 elf/external.h. Include <elf.h> instead but only if necessary.
11347
11348 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11349
11350 * linux-low.c (linux_remove_process): Remove `detaching'
11351 parameter. Don't release/detach from thread_db here.
11352 (linux_kill): Release/detach from thread_db here, ...
11353 (linux_detach): ... and here, before actually detaching.
11354 (linux_wait_1): ... and here, when a process exits.
11355 * thread-db.c (any_thread_of): New.
11356 (thread_db_free): Switch the current inferior to a thread of the
11357 passed in process.
11358
11359 2009-12-21 Doug Evans <dje@google.com>
11360
11361 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11362
11363 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11364 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11365 warning ifndef __NR_tkill. Move setting of errno there too.
11366 Delete unnecessary resetting of errno after syscall.
11367 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11368
11369 * configure.ac: Check for dladdr.
11370 * config.in: Regenerate.
11371 * configure: Regenerate.
11372 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11373 (try_thread_db_load): Update.
11374
11375 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11376
11377 2009-12-18 Doug Evans <dje@google.com>
11378
11379 * event-loop.c: Include unistd.h if it exists.
11380
11381 * linux-low.c (my_waitpid): Move definition away from being in
11382 between linux_tracefork_child/linux_test_for_tracefork.
11383
11384 * gdb_proc_service.h (psaddr_t): Fix type.
11385 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11386 signature to match glibc.
11387
11388 2009-12-16 Doug Evans <dje@google.com>
11389
11390 * linux-low.c (linux_read_memory): Fix argument to read.
11391
11392 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11393
11394 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11395 events, don't leave current_inferior pointing at null.
11396
11397 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11398
11399 * win32-low.c (LOG): Delete.
11400 (OUTMSG): Output to stderr.
11401 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11402 on compile time LOG macro.
11403 (win32_wait): Fix debug output.
11404
11405 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11406
11407 * win32-low.c (win32_add_one_solib): If the dll name is
11408 "ntdll.dll", prepend the system directory to the dll path.
11409
11410 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11411
11412 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11413
11414 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11415 Vladimir Prus <vladimir@codesourcery.com>
11416
11417 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11418 * configure.ac: Check for __mcoldfire__ and set
11419 gdb_cv_m68k_is_coldfire.
11420 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11421 reg-cf.o and reg-m68k.o.
11422 * configure: Regenerated.
11423
11424 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11425
11426 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11427 Pass it to thread_db_free.
11428 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11429 proper `detaching' argument to linux_remove_process.
11430 * linux-low.h (thread_db_free): Add `detaching' parameter.
11431 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11432 to thread_db_free.
11433 (thread_db_free): Add `detaching' parameter. Only
11434 call td_ta_clear_event if detaching from process.
11435
11436 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11437
11438 * thread-db.c (thread_db_free): Fix typo.
11439
11440 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11441
11442 PR gdb/10838
11443 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11444
11445 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11446
11447 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11448 with an i686 compiler.
11449 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11450 needed.
11451 * configure: Rebuilt.
11452
11453 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11454
11455 PR gdb/10783
11456
11457 * server.c (handle_search_memory_1): Correct read_addr initialization
11458 in loop for searching subsequent chunks.
11459
11460 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11461
11462 * configure.ac: New --with-libthread-db option.
11463 * thread-db.c: Allow direct dependence on libthread_db.
11464 (thread_db_free): Adjust.
11465 * config.in: Regenerate.
11466 * configure: Likewise.
11467
11468 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11469
11470 PR gdb/10757
11471 * thread-db.c (attach_thread): New function.
11472 (maybe_attach_thread): Return success/failure.
11473 (find_new_threads_callback): Adjust.
11474 (thread_db_find_new_threads): Loop until no new threads.
11475
11476 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11477
11478 * proc-service.c (ps_lgetregs): Formatting.
11479
11480 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11481
11482 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11483 * configure.ac: Adjust.
11484 * linux-low.h (struct process_info_private): Move members to struct
11485 thread_db.
11486 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11487 * linux-low.c (linux_remove_process): Adjust.
11488 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11489 * server.c (handle_query): Move code ...
11490 (handle_monitor_command): ... here. New function.
11491 * target.h (struct target_ops): New member.
11492 * thread-db.c (struct thread_db): New.
11493 (libthread_db_search_path): New variable.
11494 (thread_db_create_event, thread_db_enable_reporting)
11495 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11496 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11497 (try_thread_db_load_1, dladdr_to_soname): New functions.
11498 (try_thread_db_load, thread_db_load_search): New functions.
11499 (thread_db_init): Search for libthread_db.
11500 (thread_db_free): New function.
11501 (thread_db_handle_monitor_command): Likewise.
11502 * config.in: Regenerate.
11503 * configure: Regenerate.
11504
11505 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11506
11507 * spu-low.c (spu_kill): Wait for inferior to terminate.
11508 Call clear_inferiors.
11509 (spu_detach): Call clear_inferiors.
11510
11511 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11512
11513 * aclocal.m4: Regenerate.
11514 * config.in: Likewise.
11515 * configure: Likewise.
11516
11517 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11518
11519 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11520 (parse_spufs_run): New function.
11521 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11522 (ppc_breakpoint_at): Handle SPU breakpoints.
11523
11524 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11525
11526 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11527 (SPUFS_MAGIC): Define.
11528 (spu_enumerate_spu_ids): New function.
11529 (linux_qxfer_spu): New function.
11530 (linux_target_ops): Install linux_qxfer_spu.
11531
11532 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11533
11534 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11535 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11536 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11537 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11538 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11539 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11540 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11541 (init_registers_powerpc_cell32l): Add prototype.
11542 (init_registers_powerpc_cell64l): Likewise.
11543 (ppc_arch_setup): Detect Cell/B.E. architecture.
11544
11545 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11546
11547 * Makefile.in (datarootdir): New variable.
11548
11549 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11550
11551 * linux-low.c (linux_write_memory): Update debugging output.
11552 * Makefile.in (clean): Add new descriptions.
11553 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11554 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11555 * configure.srv: Add new files for arm*-*-linux*.
11556 * linux-arm-low.c: Add new declarations.
11557 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11558 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11559 (HWCAP_VFPv3D16): New.
11560 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11561 instead of __IWMMXT__.
11562 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11563 (arm_arch_setup): New.
11564 (target_regsets): Remove #ifdef. Add VFP regset.
11565 (the_low_target): Use arm_arch_setup.
11566
11567 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11570 the main thread again.
11571
11572 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11573
11574 Adding Neutrino gdbserver.
11575 * configure: Regenerated.
11576 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11577 * configure.srv (i[34567]86-*-nto*): New target.
11578 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11579 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11580 (nto_comctrl) [__QNX__]: New function.
11581 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11582
11583 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11584
11585 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11586 srv_tgtobj.
11587
11588 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11589 Pedro Alves <pedro@codesourcery.com>
11590
11591 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11592 don't support CONTEXT_EXTENDED_REGISTERS.
11593 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11594 (the_low_target): Install them.
11595 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11596 failing with ERROR_PIPE_NOT_CONNECTED.
11597
11598 2009-06-30 Doug Evans <dje@google.com>
11599 Pierre Muller <muller@ics.u-strasbg.fr>
11600
11601 Add h/w watchpoint support to x86-linux, win32-i386.
11602 * Makefile.in (SFILES): Add i386-low.c
11603 (i386_low_h): Define.
11604 (i386-low.o): Add dependencies.
11605 (linux-x86-low.o): Add i386-low.h dependency.
11606 (win32-i386-low.o): Ditto.
11607 * i386-low.c: New file.
11608 * i386-low.h: New file.
11609 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11610 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11611 * linux-low.c (linux_add_process): Initialize arch_private.
11612 (linux_remove_process): Free arch_private.
11613 (add_lwp): Initialize arch_private.
11614 (delete_lwp): Free arch_private.
11615 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11616 provided.
11617 * linux-low.h (process_info_private): New member arch_private.
11618 (lwp_info): New member arch_private.
11619 (linux_target_ops): New members new_process, new_thread,
11620 prepare_to_resume.
11621 (ptid_of): New macro.
11622 * linux-x86-low.c: Include stddef.h, i386-low.h.
11623 (arch_process_info): New struct.
11624 (arch_lwp_info): New struct.
11625 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11626 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11627 (i386_dr_low_get_status): New function.
11628 (x86_insert_point, x86_remove_point): New functions.
11629 (x86_stopped_by_watchpoint): New function.
11630 (x86_stopped_data_address): New function.
11631 (x86_linux_new_process, x86_linux_new_thread): New functions.
11632 (x86_linux_prepare_to_resume): New function.
11633 (the_low_target): Add entries for insert_point, remove_point,
11634 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11635 prepare_to_resume.
11636 * server.c (debug_hw_points): New global.
11637 (monitor_show_help): Document set debug-hw-points.
11638 (handle_query): Process "set debug-hw-points".
11639 * server.h (debug_hw_points): Declare.
11640 (paddress): Declare.
11641 * utils.c (NUMCELLS, CELLSIZE): New macros.
11642 (get_sell, xsnprintf, paddress): New functions.
11643 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11644 remove_point, stopped_by_watchpoint, stopped_data_address.
11645 * win32-i386-low.c: Include i386-low.h.
11646 (debug_reg_state): Replaces dr.
11647 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11648 (i386_dr_low_get_status): New function.
11649 (i386_insert_point, i386_remove_point): New functions.
11650 (i386_stopped_by_watchpoint): New function.
11651 (i386_stopped_data_address): New function.
11652 (i386_initial_stuff): Update.
11653 (get_thread_context,set_thread_context,i386_thread_added): Update.
11654 (the_low_target): Add entries for insert_point,
11655 remove_point, stopped_by_watchpoint, stopped_data_address.
11656 * win32-low.c (win32_insert_watchpoint): New function.
11657 (win32_remove_watchpoint): New function.
11658 (win32_stopped_by_watchpoint): New function.
11659 (win32_stopped_data_address): New function.
11660 (win32_target_ops): Add entries for insert_watchpoint,
11661 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11662 * win32-low.h (win32_target_ops): New members insert_point,
11663 remove_point, stopped_by_watchpoint, stopped_data_address.
11664
11665 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11666
11667 * server.c (process_serial_event): Re-return unsupported, not
11668 error, if the type isn't recognized. Re-allow supporting only
11669 insert or remove packets. Also call require_running for
11670 breakpoints. Add missing break statement to default case. Tidy.
11671 * target.h (struct target_ops): Rename insert_watchpoint to
11672 insert_point, and remove_watchpoint to remove_point.
11673
11674 * linux-low.h (struct linux_target_ops): Likewise.
11675 * linux-low.c (linux_insert_watchpoint): Rename to ...
11676 (linux_insert_point): ... this. Adjust.
11677 (linux_remove_watchpoint): Rename to ...
11678 (linux_remove_point): ... this. Adjust.
11679 (linux_target_ops): Adjust.
11680 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11681 (cris_insert_point): ... this.
11682 (cris_remove_watchpoint): Rename to ...
11683 (cris_remove_point): ... this.
11684 (the_low_target): Adjust.
11685
11686 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11687
11688 * server.c (handle_v_kill): Pass signal_pid to
11689 kill_inferior if multi_process is zero.
11690
11691 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11692
11693 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11694 * target.h (target_ops): Comment for *_watchpoint to make it clear
11695 the functions can get types '0' and '1'.
11696
11697 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11698
11699 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11700 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11701 * regcache.c (get_regcache): Likewise.
11702 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11703 * win32-low.c (child_fetch_inferior_registers): Remove check for
11704 regno 0.
11705
11706 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11707 Pedro Alves <pedro@codesourcery.com>
11708
11709 * target.h (struct target_ops) <supports_multi_process>: New
11710 callback.
11711 (target_supports_multi_process): New.
11712 * server.c (handle_query): Even if GDB reports support, only
11713 enable multi-process if the target also supports it. Report
11714 multi-process support only if the target backend supports it.
11715 * linux-low.c (linux_supports_multi_process): New function.
11716 (linux_target_ops): Install it as target_supports_multi_process
11717 callback.
11718
11719 2009-05-24 Doug Evans <dje@google.com>
11720
11721 Global renaming of find_thread_pid to find_thread_ptid.
11722 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11723 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11724 All callers updated.
11725
11726 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11727 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11728 directly.
11729
11730 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11731 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11732 (linux_resume_one_lwp): Ditto.
11733
11734 2009-05-23 Doug Evans <dje@google.com>
11735
11736 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11737 from struct inferior_list_entry * to struct lwp_info *.
11738 All callers updated.
11739
11740 2009-05-13 Doug Evans <dje@google.com>
11741
11742 * linux-x86-low.c: Don't include assert.h.
11743 (x86_siginfo_fixup): Use fatal, not assert.
11744 (x86_arch_setup): Fix comment.
11745
11746 2009-05-12 Doug Evans <dje@google.com>
11747
11748 Biarch support for i386/amd64 gdbserver.
11749 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11750 Add linux-x86-low.c.
11751 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11752 (linux-x86-low.o): Add.
11753 * linux-x86-64-low.c: Delete.
11754 * linux-i386-low.c: Delete.
11755 * linux-x86-low.c: New file.
11756 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11757 linux-x86-low.o.
11758 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11759 linux-x86-low.o.
11760 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11761 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11762 (linux_child_pid_to_exec_file): New function.
11763 (elf_64_header_p, elf_64_file_p): New functions.
11764 (siginfo_fixup): New function.
11765 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11766 give target a chance to convert layout.
11767 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11768 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11769
11770 2009-05-07 Doug Evans <dje@google.com>
11771
11772 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11773 (regsets_store_inferior_registers): Ditto.
11774
11775 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11776
11777 PR server/10048
11778
11779 * linux-low.c (must_set_ptrace_flags): Delete.
11780 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11781 of the global.
11782 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11783 `lwp->must_set_ptrace_flags' instead.
11784 (linux_wait_for_event_1): Set ptrace options here.
11785 (linux_wait_1): ... not here.
11786
11787 2009-04-30 Doug Evans <dje@google.com>
11788
11789 * inferiors.c (started_inferior_callback): New function.
11790 (attached_inferior_callback): New function.
11791 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11792 * server.c (print_started_pid, print_attached_pid): New functions.
11793 (detach_or_kill_for_exit): New function.
11794 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11795 * server.h (have_started_inferiors_p): Declare.
11796 (have_attached_inferiors_p): Declare.
11797
11798 * inferiors.c (remove_process): Fix memory leak, free process.
11799 * linux-low.c (linux_remove_process): New function.
11800 (linux_kill): Call it instead of remove_process.
11801 (linux_detach, linux_wait_1): Ditto.
11802
11803 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11804
11805 * configure.srv: Add x86 Windows CE target.
11806
11807 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11808
11809 * inferiors.c (get_thread_process): Make global.
11810 * server.h (get_thread_process): Add prototype.
11811 * thread-db.c (find_one_thread): Use get_thread_process
11812 instead of current_process.
11813 (thread_db_get_tls_address): Do not crash if called when
11814 thread layer is not yet initialized.
11815
11816 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11817
11818 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11819 * spu-low.c (current_tid): Rename to ...
11820 (current_ptid): ... this.
11821 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11822 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11823 ptid_get_lwp (current_ptid) instead of current_tid.
11824 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11825 instead of current_tid. Use find_process_pid to verify pid
11826 argument is valid. Pass proper argument to remove_process.
11827 (spu_thread_alive): Compare current_ptid instead of current_tid.
11828 (spu_resume): Likewise.
11829
11830 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11831
11832 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11833 variable.
11834
11835 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11836
11837 Implement the multiprocess extensions, and add linux multiprocess
11838 support.
11839
11840 * server.h (ULONGEST): Declare.
11841 (struct ptid, ptid_t): New.
11842 (minus_one_ptid, null_ptid): Declare.
11843 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11844 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11845 (struct inferior_list_entry): Change `id' type from unsigned from
11846 to ptid_t.
11847 (struct sym_cache, struct breakpoint, struct
11848 process_info_private): Forward declare.
11849 (struct process_info): Declare.
11850 (current_process): Declare.
11851 (all_processes): Declare.
11852 (initialize_inferiors): Declare.
11853 (add_thread): Adjust to use ptid_t.
11854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11855 (add_process, remove_process, find_thread_pid): Declare.
11856 (find_inferior_id): Adjust to use ptid_t.
11857 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11858 (multi_process): Declare.
11859 (push_event): Adjust to use ptid_t.
11860 (read_ptid, write_ptid): Declare.
11861 (prepare_resume_reply): Adjust to use ptid_t.
11862 (clear_symbol_cache): Declare.
11863 * inferiors.c (all_processes): New.
11864 (null_ptid, minus_one_ptid): New.
11865 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11866 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11867 (add_thread): Change unsigned long to ptid. Remove gdb_id
11868 parameter. Adjust.
11869 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11870 (gdb_id_to_thread): Rename to ...
11871 (find_thread_pid): ... this. Change unsigned long to ptid.
11872 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11873 (loaded_dll, pull_pid_from_list): Adjust.
11874 (add_process, remove_process, find_process_pid)
11875 (get_thread_process, current_process, initialize_inferiors): New.
11876 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11877 (struct target_waitstatus) <related_pid>: Ditto.
11878 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11879 return type to int.
11880 (struct target_ops) <join>: Add `pid' argument.
11881 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11882 (struct target_ops) <wait>: Add `ptid' field. Change return type
11883 to ptid.
11884 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11885 (mywait): Add `ptid' argument. Change return type to ptid_t.
11886 (target_pid_to_str): Declare.
11887 * target.c (set_desired_inferior): Adjust to use ptids.
11888 (mywait): Add new `ptid' argument. Adjust.
11889 (target_pid_to_str): New.
11890 * mem-break.h (free_all_breakpoints): Declare.
11891 * mem-break.c (breakpoints): Delelete.
11892 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11893 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11894 to use per-process breakpoint list.
11895 (free_all_breakpoints): New.
11896 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11897 (symbol_cache, all_symbols_looked_up): Delete.
11898 (hexchars): New.
11899 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11900 read_ptid): New.
11901 (prepare_resume_reply): Change ptid argument's type from unsigned
11902 long to ptid_t. Adjust. Implement W;process and X;process.
11903 (free_sym_cache, clear_symbol_cache): New.
11904 (look_up_one_symbol): Adjust to per-process symbol cache. *
11905 * server.c (cont_thread, general_thread, step_thread): Change type
11906 to ptid_t.
11907 (attached): Delete.
11908 (multi_process): New.
11909 (last_ptid): Change type to ptid_t.
11910 (struct vstop_notif) <ptid>: Change type to ptid_t.
11911 (queue_stop_reply, push_event): Change `ptid' argument's type to
11912 ptid_t.
11913 (discard_queued_stop_replies): Add `pid' argument.
11914 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11915 changes. Don't reference the `attached' global.
11916 (attach_inferior): Adjust to mywait interface changes.
11917 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11918 features. Handle and report "multiprocess+". Handle
11919 "qAttached:PID".
11920 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11921 changes.
11922 (handle_v_kill): New.
11923 (handle_v_stopped): Adjust to use target_pid_to_str.
11924 (handle_v_requests): Allow multiple attaches and runs when
11925 multiprocess extensions are in effect. Handle "vKill".
11926 (myresume): Adjust to use ptids.
11927 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11928 (handle_status): Adjust to discard_queued_stop_replies interface
11929 change.
11930 (first_thread_of, kill_inferior_callback)
11931 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11932 (main): Call initialize_inferiors. Adjust to use ptids, killing
11933 and detaching from all inferiors. Handle multiprocess packet
11934 variants.
11935 * linux-low.h: Include gdb_proc_service.h.
11936 (struct process_info_private): New.
11937 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11938 <lwpid_of>: Use ptid_get_lwp.
11939 (get_lwp_thread): Adjust.
11940 (struct lwp_info): Add `dead' member.
11941 (find_lwp_pid): Declare.
11942 * linux-low.c (thread_db_active): Delete.
11943 (new_inferior): Adjust comment.
11944 (inferior_pid): Delete.
11945 (linux_add_process): New.
11946 (handle_extended_wait): Adjust.
11947 (add_lwp): Change unsigned long to ptid.
11948 (linux_create_inferior): Add process to processes table. Adjust
11949 to use ptids. Don't set new_inferior here.
11950 (linux_attach_lwp): Rename to ...
11951 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11952 it. Adjust to use ptids.
11953 (linux_attach_lwp): New.
11954 (linux_attach): Add process to processes table. Don't set
11955 new_inferior here.
11956 (struct counter): New.
11957 (second_thread_of_pid_p, last_thread_of_process_p): New.
11958 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11959 multiple processes.
11960 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11961 processes. Remove process from process table.
11962 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11963 to multiple processes.
11964 (any_thread_of): New.
11965 (linux_detach): Add `pid' argument, and handle it. Remove process
11966 from processes table.
11967 (linux_join): Add `pid' argument. Handle it.
11968 (linux_thread_alive): Change unsighed long argument to ptid_t.
11969 Consider dead lwps as not being alive.
11970 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11971 threads we're not interested in.
11972 (same_lwp, find_lwp_pid): New.
11973 (linux_wait_for_lwp): Change `pid' argument's type from int to
11974 ptid_t. Adjust.
11975 (linux_wait_for_event): Rename to ...
11976 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11977 from int to ptid_t. Adjust.
11978 (linux_wait_for_event): New.
11979 (linux_wait_1): Add `ptid' argument. Change return type to
11980 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11981 that exit from the process table.
11982 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11983 Adjust.
11984 (mark_lwp_dead): New.
11985 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11986 stopping all threads, mark its main lwp as dead.
11987 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11988 ptids.
11989 (fetch_register, usr_store_inferior_registers)
11990 (regsets_fetch_inferior_registers)
11991 (regsets_store_inferior_registers, linux_read_memory)
11992 (linux_write_memory): Inline `inferior_pid'.
11993 (linux_look_up_symbols): Adjust to use per-process
11994 `thread_db_active'.
11995 (linux_request_interrupt): Adjust to use ptids.
11996 (linux_read_auxv): Inline `inferior_pid'.
11997 (initialize_low): Don't reference thread_db_active.
11998 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11999 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12000 (ps_getpid): Return the pid of the current inferior.
12001 * thread-db.c (proc_handle, thread_agent): Delete.
12002 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12003 per-process data.
12004 (find_one_thread): Change argument type to ptid_t. Adjust to
12005 per-process data.
12006 (maybe_attach_thread): Adjust to per-process data and ptids.
12007 (thread_db_find_new_threads): Ditto.
12008 (thread_db_init): Ditto.
12009 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12010 processes table. Adjust to use ptids.
12011 (spu_kill, spu_detach): Adjust interface. Remove process from
12012 processes table.
12013 (spu_join, spu_thread_alive): Adjust interface.
12014 (spu_wait): Adjust interface. Remove process from processes
12015 table. Adjust to use ptids.
12016 * win32-low.c (current_inferior_tid): Delete.
12017 (current_inferior_ptid): New.
12018 (debug_event_ptid): New.
12019 (thread_rec): Take a ptid. Adjust.
12020 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12021 (child_delete_thread): Ditto.
12022 (do_initial_child_stuff): Add `attached' argument. Add process to
12023 processes table.
12024 (child_fetch_inferior_registers, child_store_inferior_registers):
12025 Adjust.
12026 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12027 (win32_attach): Pass 1 to do_initial_child_stuff.
12028 (win32_kill): Adjust interface. Remove process from processes
12029 table.
12030 (win32_detach): Ditto.
12031 (win32_join): Adjust interface.
12032 (win32_thread_alive): Take a ptid.
12033 (win32_resume): Adjust to use ptids.
12034 (get_child_debug_event): Ditto.
12035 (win32_wait): Adjust interface. Remove exiting process from
12036 processes table.
12037
12038 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12039
12040 Non-stop mode support.
12041
12042 * server.h (non_stop): Declare.
12043 (gdb_client_data, handler_func): Declare.
12044 (delete_file_handler, add_file_handler, start_event_loop):
12045 Declare.
12046 (handle_serial_event, handle_target_event, push_event)
12047 (putpkt_notif): Declare.
12048 * target.h (enum resume_kind): New.
12049 (struct thread_resume): Replace `step' field by `kind' field.
12050 (TARGET_WNOHANG): Define.
12051 (struct target_ops) <wait>: Add `options' argument.
12052 <supports_non_stop, async, start_non_stop>: New fields.
12053 (target_supports_non_stop, target_async): New.
12054 (start_non_stop): Declare.
12055 (mywait): Add `options' argument.
12056 * target.c (mywait): Add `options' argument. Print child exit
12057 notifications here.
12058 (start_non_stop): New.
12059 * server.c (non_stop, own_buf, mem_buf): New globals.
12060 (struct vstop_notif): New.
12061 (notif_queue): New global.
12062 (queue_stop_reply, push_event, discard_queued_stop_replies)
12063 (send_next_stop_reply): New.
12064 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12065 interface changes.
12066 (attach_inferior): In non-stop mode, don't wait for the target
12067 here.
12068 (handle_general_set): Handle QNonStop.
12069 (handle_query): When handling qC, return the current general
12070 thread, instead of the first thread of the list.
12071 (handle_query): If the backend supports non-stop mode, include
12072 QNonStop+ in the qSupported query response.
12073 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12074 and non-stop mode.
12075 (handle_v_attach, handle_v_run): Handle non-stop mode.
12076 (handle_v_stopped): New.
12077 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12078 (myresume): Adjust to use resume_kind. Handle non-stop.
12079 (queue_stop_reply_callback): New.
12080 (handle_status): Handle non-stop mode.
12081 (main): Clear non_stop flag on reconnection. Use the event-loop.
12082 Refactor serial protocol handling from here ...
12083 (process_serial_event): ... to this new function. When GDB
12084 selects any thread, select one here. In non-stop mode, wait until
12085 GDB acks all pending events before exiting.
12086 (handle_serial_event, handle_target_event): New.
12087 * remote-utils.c (remote_open): Install remote_desc in the event
12088 loop.
12089 (remote_close): Remove remote_desc from the event loop.
12090 (putpkt_binary): Rename to...
12091 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12092 (putpkt_binary): New as wrapper around putpkt_binary_1.
12093 (putpkt_notif): New.
12094 (prepare_resume_reply): In non-stop mode, don't change the
12095 general_thread.
12096 * event-loop.c: New.
12097 * Makefile.in (OBJ): Add event-loop.o.
12098 (event-loop.o): New rule.
12099
12100 * linux-low.h (pid_of): Moved here.
12101 (lwpid_of): New.
12102 (get_lwp_thread): Use lwpid_of.
12103 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12104 * linux-low.c (pid_of): Delete.
12105 (inferior_pid): Use lwpid_of.
12106 (linux_event_pipe): New.
12107 (target_is_async_p): New.
12108 (delete_lwp): New.
12109 (handle_extended_wait): Use lwpid_of.
12110 (add_lwp): Don't set lwpid field.
12111 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12112 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12113 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12114 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12115 first. Adjust to linux_wait_for_event interface changes. Use
12116 lwpid_of.
12117 (linux_detach): Don't delete the main lwp here.
12118 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12119 (status_pending_p): Don't consider explicitly suspended lwps.
12120 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12121 pointer. Add OPTIONS argument. Change return type to int. Use
12122 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12123 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12124 pointer. Add status pointer argument. Return a pid instead of a
12125 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12126 changes. In non-stop mode, don't switch to a random thread.
12127 (linux_wait): Rename to...
12128 (linux_wait_1): ... this. Add target_options argument, and handle
12129 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12130 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12131 clean exit and signal exit code. Don't stop all threads in
12132 non-stop mode. In all-stop mode, only stop all threads when
12133 reporting a stop to GDB. Handle explicit thread stop requests.
12134 (async_file_flush, async_file_mark): New.
12135 (linux_wait): New.
12136 (send_sigstop): Use lwpid_of.
12137 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12138 interface changes. In non-stop mode, don't switch to a random
12139 thread.
12140 (linux_resume_one_lwp): Use lwpid_of.
12141 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12142 (linux_resume_one_thread): ... this. Handle resume_stop. In
12143 non-stop mode, don't look for pending flag in all threads.
12144 (resume_status_pending_p): Don't consider explicitly suspended
12145 threads.
12146 (my_waitpid): Reimplement. Emulate __WALL.
12147 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12148 Use lwpid_of.
12149 (sigchld_handler, linux_supports_non_stop, linux_async)
12150 (linux_start_non_stop): New.
12151 (linux_target_ops): Register linux_supports_non_stop, linux_async
12152 and linux_start_non_stop.
12153 (initialize_low): Install SIGCHLD handler.
12154 * thread-db.c (thread_db_create_event, find_one_thread)
12155 (thread_db_get_tls_address): Use lwpid_of.
12156 * win32-low.c (win32_detach): Adjust to use resume_kind.
12157 (win32_wait): Add `options' argument.
12158 * spu-low.c (spu_resume): Adjust to use resume_kind.
12159 (spu_wait): Add `options' argument.
12160
12161 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12162
12163 Decouple target code from remote protocol.
12164
12165 * target.h (enum target_waitkind): New.
12166 (struct target_waitstatus): New.
12167 (struct target_ops) <wait>: Return an unsigned long. Take a
12168 target_waitstatus pointer instead of a char pointer.
12169 (mywait): Likewise.
12170 * target.c (mywait): Change prototype to return an unsigned long.
12171 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12172 * server.h (thread_from_wait, old_thread_from_wait): Delete
12173 declarations.
12174 (prepare_resume_reply): Change prototype to take a
12175 target_waitstatus.
12176 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12177 (last_status, last_ptid): New.
12178 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12179 pid instead of a signal.
12180 (attach_inferior): Remove "status" and "signal" parameters.
12181 Adjust.
12182 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12183 not as an address.
12184 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12185 (handle_v_requests, myresume): Remove "status" and "signal"
12186 parameters. Adjust.
12187 (handle_status): New.
12188 (main): Delete local `status'. Adjust.
12189 * remote-utils.c: Include target.h.
12190 (prepare_resume_reply): Change prototype to take a
12191 target_waitstatus. Adjust.
12192
12193 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12194 interface.
12195 * spu-low.c (spu_wait): Adjust.
12196 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12197 Delete.
12198 (win32_wait): Adjust.
12199
12200 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12201
12202 * target.h (struct thread_resume): Delete leave_stopped member.
12203 (struct target_ops): Add a `n' argument to the `resume' callback.
12204 * server.c (start_inferior): Adjust.
12205 (handle_v_cont, myresume): Adjust.
12206 * linux-low.c (check_removed_breakpoint): Adjust to resume
12207 interface change, and to removed leave_stopped field.
12208 (resume_ptr): Delete.
12209 (struct thread_resume_array): New.
12210 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12211 resume interface change.
12212 (linux_continue_one_thread, linux_queue_one_thread)
12213 (resume_status_pending_p): Check if the resume field is NULL
12214 instead of checking the leave_stopped member.
12215 (linux_resume): Adjust to the target resume interface change.
12216 * spu-low.c (spu_resume): Adjust to the target resume interface
12217 change.
12218 * win32-low.c (win32_detach, win32_resume): Ditto.
12219
12220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12221
12222 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12223 flag.
12224 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12225 pending.
12226 (linux_continue_one_thread): Only preserve the stepping flag if
12227 there's a pending breakpoint.
12228
12229 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12230
12231 * server.c (main): After the inferior having exited, call
12232 remote_close before exiting gdbserver.
12233
12234 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12235
12236 Fix size of FPSCR in Power 7 processors.
12237 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12238 (PPC_FEATURE_HAS_DFP): New #define.
12239 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12240 size of the FPSCR.
12241
12242 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12243
12244 * server.c (handle_query) Whitespace and formatting.
12245
12246 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12247
12248 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12249 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12250 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12251 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12252 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12253 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12254 Makefile.in, configure.ac: Fix whitespace throughout.
12255 * configure: Regenerate.
12256
12257 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12258
12259 * inferiors.c (find_inferior): Make it safe for the callback
12260 function to delete the currently iterated inferior.
12261
12262 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12263
12264 * Makefile.in (linuw_low_h): Move higher.
12265 (thread-db.o): Depend on $(linux_low_h).
12266
12267 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12268
12269 Rename "process" to "lwp" throughout.
12270
12271 * linux-low.c (all_processes): Rename to...
12272 (all_lwps): ... this.
12273 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12274 (add_process): Rename to ...
12275 (add_lwp): ... this. Adjust.
12276 (linux_create_inferior): Adjust.
12277 (linux_attach_lwp): Adjust.
12278 (linux_attach): Adjust.
12279 (linux_kill_one_process): Rename to ...
12280 (linux_kill_one_lwp): ... this. Adjust.
12281 (linux_kill): Adjust.
12282 (linux_detach_one_process): Rename to ...
12283 (linux_detach_one_lwp): ... this. Adjust.
12284 (linux_detach): Adjust.
12285 (check_removed_breakpoint): Adjust.
12286 (status_pending_p): Adjust.
12287 (linux_wait_for_process): Rename to ...
12288 (linux_wait_for_lwp): ... this. Adjust.
12289 (linux_wait_for_event): Adjust.
12290 (send_sigstop): Adjust.
12291 (wait_for_sigstop): Adjust.
12292 (stop_all_processes): Rename to ...
12293 (stop_all_lwps): ... this.
12294 (linux_resume_one_process): Rename to ...
12295 (linux_resume_one_lwp): ... this. Adjust.
12296 (linux_set_resume_request, linux_continue_one_thread)
12297 (linux_queue_one_thread, resume_status_pending_p)
12298 (usr_store_inferior_registers, regsets_store_inferior_registers)
12299 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12300 Adjust.
12301 * linux-low.h (get_process): Rename to ...
12302 (get_lwp): ... this. Adjust.
12303 (get_thread_process): Rename to ...
12304 (get_thread_lwp): ... this. Adjust.
12305 (get_process_thread): Rename to ...
12306 (get_lwp_thread): ... this. Adjust.
12307 (struct process_info): Rename to ...
12308 (struct lwp_info): ... this.
12309 (all_processes): Rename to ...
12310 (all_lwps): ... this.
12311 * proc-service.c (ps_lgetregs): Adjust.
12312 * thread-db.c (thread_db_create_event, find_one_thread)
12313 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12314
12315 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12316
12317 * server.c (handle_query): Handle "qAttached".
12318
12319 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12320
12321 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12322 GPLv3, update license URL.
12323
12324 2009-03-01 Doug Evans <dje@google.com>
12325
12326 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12327 (server_h): Add gdb_signals.h.
12328 (signals.o): Update.
12329 * server.h (target_signal_from_host,target_signal_to_host_p)
12330 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12331
12332 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12333
12334 * remote-utils.c (getpkt): Also generate remote-debug
12335 information if noack_mode is set.
12336
12337 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12338
12339 * server.c (handle_query): Report qXfer:siginfo:read and
12340 qXfer:siginfo:write as supported and handle them.
12341 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12342 * linux-low.c (linux_xfer_siginfo): New.
12343 (linux_target_ops): Set it.
12344
12345 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12346
12347 * server.c (gdbserver_usage): Mention --remote-debug.
12348 (main): Accept '--remote-debug' switch.
12349
12350 2009-01-18 Doug Evans <dje@google.com>
12351
12352 * regcache.c (new_register_cache): No need to check result of xcalloc.
12353 * server.c (handle_search_memory): Back out calls to xmalloc,
12354 result is checked and error is returned to user upon failure.
12355 (handle_query): Ditto. Add more checks for result of malloc.
12356 (handle_v_cont): Check result of malloc, report error back to
12357 user upon failure.
12358 (handle_v_run): Ditto. Call freeargv.
12359 * server.h (freeargv): Declare.
12360 * utils.c (freeargv): New fn.
12361
12362 2009-01-15 Doug Evans <dje@google.com>
12363
12364 * gdbreplay.c (perror_with_name): Make arg const char *.
12365 * server.h (target_signal_to_name): Make return type const char *.
12366 * thread-db.c (thread_db_err_str): Make return type const char *.
12367 * utils.c (perror_with_name): Make arg const char *.
12368
12369 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12370
12371 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12372 when handling a EXIT_PROCESS_DEBUG_EVENT.
12373
12374 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12375
12376 * gdbreplay.c (gdbreplay_version): Update copyright year.
12377 * server.c (gdbserver_version): Likewise.
12378
12379 2009-01-05 Doug Evans <dje@google.com>
12380
12381 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12382 (handle_extended_wait): Improve comment.
12383
12384 2008-12-13 Doug Evans <dje@google.com>
12385
12386 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12387 * server.h (ATTR_MALLOC): New macro.
12388 (xmalloc,xcalloc,xstrdup): Declare.
12389 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12390 * inferiors.c: Ditto.
12391 * linux-low.c: Ditto.
12392 * mem-break.c: Ditto.
12393 * regcache.c: Ditto.
12394 * remote-utils.c: Ditto.
12395 * server.c: Ditto.
12396 * target.c: Ditto.
12397 * win32-low.c: Ditto.
12398
12399 2008-12-12 Doug Evans <dje@google.com>
12400
12401 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12402 in debugging printf.
12403
12404 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12405
12406 2008-12-09 Doug Evans <dje@google.com>
12407
12408 * linux-low.h (struct process_info): Delete member tid, unused.
12409 * thread-db.c (find_one_thread): Update.
12410 (maybe_attach_thread): Update.
12411
12412 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12413
12414 * target.h (struct target_ops): Add qxfer_osdata member.
12415 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12416 and dirent.h.
12417 (linux_qxfer_osdata): New functions.
12418 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12419 callback.
12420 * server.c (handle_query): Handle "qXfer:osdata:read:".
12421 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12422 (buffer_xml_printf): New functions.
12423 * server.h (struct buffer): New.
12424 (buffer_grow_str, buffer_grow_str0): New macros.
12425 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12426 (buffer_xml_printf): Declare.
12427
12428 2008-11-24 Doug Evans <dje@google.com>
12429
12430 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12431
12432 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12433
12434 * server.c (handle_v_run): Always use the supplied argument list.
12435
12436 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12437
12438 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12439 (xtensa_regmap_table): Add entry for scompare1.
12440
12441 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12442
12443 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12444 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12445 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12446 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12447 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12448 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12449 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12450 XML target descriptions.
12451 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12452 when inferior is running on an ISA 2.05 or later processor. Add
12453 special case to return offset for full 64-bit slot of FPSCR when
12454 in 32-bits.
12455
12456 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12457
12458 * Makefile.in (SFILES, clean): Added sparc64 files.
12459 (reg-sparc64.o, reg-sparc64.c): New.
12460 * configure.srv (sparc*-*-linux*): New configuration.
12461 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12462 syscall arguments for SPARC.
12463 (regsets_store_inferior_registers): Likewise.
12464 * linux-sparc-low.c: New file.
12465
12466 2008-10-21 Doug Evans <dje@google.com>
12467
12468 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12469 (READLINE_DIR,READLINE_DEP): Delete.
12470 (INTERNAL_CFLAGS): Update.
12471 (LINTFLAGS): Update.
12472
12473 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12474
12475 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12476 whole argv from the last run, not just argv[0].
12477
12478 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12479
12480 * regcache.c (new_register_cache): Return NULL if the register
12481 cache size isn't known yet.
12482 (free_register_cache): Avoid dereferencing a NULL regcache.
12483
12484 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12485
12486 * configure.srv: Merge MIPS and MIPS64.
12487
12488 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12489
12490 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12491
12492 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12493
12494 * Makefile.in: Add required vsx dependencies.
12495
12496 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12497 Declare init_registers_powerpc_vsx32l.
12498 Declare init_registers_powerpc_vsx64l.
12499 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12500 (ppc_arch_setup): Check for VSX in hwcap.
12501 (ppc_fill_vsxregset): New function.
12502 (ppc_store_vsxregset): New function.
12503 Add new VSX entry in regset_info target_regsets.
12504
12505 * configure.srv: Add new VSX dependencies.
12506
12507 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12508
12509 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12510 (remote_open): Set or clear transport_is_reliable.
12511 (putpkt_binary): Don't expect acks in noack mode.
12512 (getpkt): Don't send ack/nac in noack mode.
12513 * server.c (handle_general_set): Handle QStartNoAckMode.
12514 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12515 qSupported.
12516 (main): Reset noack_mode on every connection.
12517 * server.h (noack_mode): Declare.
12518
12519 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12520
12521 * Makefile.in (GDBREPLAY_OBS): New variable.
12522 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12523
12524 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12525 Daniel Jacobowitz <dan@codesourcery.com>
12526
12527 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12528 (usr_store_inferior_registers): Likewise.
12529 (regsets_store_inferior_registers): Likewise.
12530
12531 2008-07-31 Rolf Jansen <rj@surtec.com>
12532 Pedro Alves <pedro@codesourcery.com>
12533
12534 * configure.ac: Check for memmem declaration.
12535 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12536 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12537 (disable_packet_qfThreadInfo): Unconditionally compile.
12538 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12539 * configure, config.in: Regenerate.
12540
12541 2008-07-28 Doug Kwan <dougkwan@google.com>
12542
12543 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12544 (linux_write_memory): Remove declaration of errno.
12545
12546 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12547
12548 * linux-low.c (handle_extended_wait): Do not use "status"
12549 variable uninitialized.
12550
12551 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12552
12553 * server.c (handle_v_attach): Inhibit reporting dll changes.
12554
12555 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12556
12557 * remote-utils.c (prepare_resume_reply): If requested, don't
12558 output "thread:TID" in the T stop reply.
12559
12560 * server.c (disable_packet_vCont, disable_packet_Tthread)
12561 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12562 (handle_query): If requested, disable support for qC, qfThreadInfo
12563 and qsThreadInfo.
12564 (handle_v_requests): If requested, disable support for vCont.
12565 (gdbserver_show_disableable): New.
12566 (main): Handle --disable-packet and --disable-packet=LIST.
12567
12568 * server.h (disable_packet_vCont, disable_packet_Tthread)
12569 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12570
12571 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12572
12573 * server.c (gdbserver_usage): Mention --version.
12574
12575 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12576
12577 * Makefile.in (gdbreplay.o): New rule.
12578
12579 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12580
12581 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12582 message, not gdbserver.
12583
12584 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12585 Nathan Sidwell <nathan@codesourcery.com>
12586 Joseph Myers <joseph@codesourcery.com>
12587
12588 * acinclude.m4: Include ../../config/acx.m4.
12589 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12590 * configure, config.in: Regenerate.
12591 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12592 * server.c (gdbserver_version): Print PKGVERSION.
12593 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12594 (main): Adjust gdbserver_usage calls.
12595 * gdbreplay.c (version, host_name): Add declarations.
12596 (gdbreplay_version, gdbreplay_usage): New.
12597 (main): Accept --version and --help options.
12598
12599 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12600
12601 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12602 (arm_breakpoint_at): Handle Thumb.
12603 (the_low_target): Add comment.
12604
12605 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12606
12607 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12608
12609 2008-05-09 Doug Evans <dje@google.com>
12610
12611 * server.h (decode_search_memory_packet): Declare.
12612 * remote-utils.c (decode_search_memory_packet): New fn.
12613 * server.c (handle_search_memory_1): New fn.
12614 (handle_search_memory): New fn.
12615 (handle_query): Process qSearch:memory packets.
12616
12617 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12618
12619 * regcache.c (registers_length): Remove.
12620 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12621 full register packet.
12622 * regcache.h (registers_length): Remove prototype.
12623 * server.h (PBUFSIZ): Define to 16384.
12624
12625 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12626
12627 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12628 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12629 powerpc-64l.o, and powerpc-altivec64l.o.
12630 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12631 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12632 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12633 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12634 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12635 to srv_xmlfiles.
12636
12637 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12638 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12639 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12640 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12641 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12642 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12643 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12644 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12645 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12646 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12647 (clean): Update.
12648
12649 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12650 (init_registers_powerpc_32l): ... this new prototype.
12651 (init_registers_powerpc_32): Remove, replace by ...
12652 (init_registers_powerpc_altivec32l): ... this new prototype.
12653 (init_registers_powerpc_e500): Remove, replace by ...
12654 (init_registers_powerpc_e500l): ... this new prototype.
12655 (init_registers_ppc64): Remove, replace by ...
12656 (init_registers_powerpc_64l): ... this new prototype.
12657 (init_registers_powerpc_64): Remove, replace by ...
12658 (init_registers_powerpc_altivec64l): ... this new prototype.
12659 (ppc_num_regs): Set to 73.
12660 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12661 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12662 (ppc_cannot_store_register): Handle orig_r3 and trap.
12663 (ppc_arch_setup): Update init_registers_... calls.
12664 (ppc_fill_gregset): Handle orig_r3 and trap.
12665
12666 * inferiors.c (clear_inferiors): Reset current_inferior.
12667
12668 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12669
12670 * acinclude.m4: Add override.m4.
12671 * configure: Regenerate.
12672
12673 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12674
12675 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12676 initial call to init_register_ppc64.
12677
12678 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12679
12680 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12681 single powerpc*-*-linux* case.
12682 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12683
12684 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12685
12686 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12687 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12688 from reg_xmlfiles.
12689 * linux-ppc-low.c: Include <elf.h>.
12690 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12691 (ppc_hwcap): New global variable.
12692 (ppc_regmap): Remove __SPE__ #ifdef sections.
12693 (ppc_regmap_e500): New global variable.
12694 (ppc_cannot_store_register): Update __SPE__ special case.
12695 (ppc_get_hwcap): New function.
12696 (ppc_arch_setup): Use it to determine whether inferior supports
12697 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12698 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12699 Do not access registers if target does not support AltiVec.
12700 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12701 Do not access registers if target does not support SPE.
12702 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12703
12704 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12705
12706 * linux-low.c (disabled_regsets, num_regsets): New.
12707 (use_regsets_p): Delete.
12708 (linux_wait_for_process): Clear disabled_regsets.
12709 (regsets_fetch_inferior_registers): Check and set it.
12710 (regsets_store_inferior_registers): Likewise.
12711 (linux_fetch_registers, linux_store_registers): Do not use
12712 use_regsets_p.
12713 (initialize_low): Allocate disabled_regsets.
12714
12715 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12716
12717 * Makefile.in (LIBOBJS): New.
12718 (OBS): Use LIBOBJS.
12719 (memmem.o): New rule.
12720 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12721 * configure: Regenerated.
12722
12723 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12724
12725 * server.c (handle_query): Never return "unsupported" for
12726 qXfer:features:read queries.
12727
12728 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12729
12730 * server.c (get_features_xml): Fix inverted condition.
12731 (handle_query): Always support qXfer:feature:read.
12732
12733 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12734
12735 * server.c (wrapper_argv): New.
12736 (start_inferior): Handle wrapper_argv. If set, expect an extra
12737 trap.
12738 (gdbserver_usage): Document --wrapper.
12739 (main): Parse --wrapper.
12740
12741 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12742
12743 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12744 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12745 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12746 (ppc_set_pc): Likewise.
12747 (ppc_arch_setup): New function.
12748 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12749 of collect_register.
12750 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12751
12752 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12753
12754 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12755 instead of linux-ppc64-low.o.
12756 * linux-ppc64-low.c: Remove file.
12757 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12758 (linux-ppc64-low.o): Remove rule.
12759
12760 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12761 (init_registers_powerpc_64): Likewise.
12762 (ppc_regmap): Conditionally define depending on __powerpc64__.
12763 (ppc_cannot_store_register): Do not special-case "fpscr" when
12764 compiled on __powerpc64__.
12765 (ppc_collect_ptrace_register): New function.
12766 (ppc_supply_ptrace_register): New function.
12767 (ppc_breakpoint): Change type to "unsigned int".
12768 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12769 (the_low_target): Conditionally provide initializers for the
12770 arch_setup member depending on __powerpc64__. Install
12771 collect_ptrace_register and supply_ptrace_register members.
12772
12773 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12774
12775 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12776 * server.c (gdbserver_xmltarget): Define.
12777 (get_features_xml): Use it to replace "target.xml" and arch_string.
12778
12779 * configure.srv: Remove srv_xmltarget. Add XML files that were
12780 mentioned there to srv_xmlfiles instead. Remove conditional tests
12781 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12782 srv_xmlfiles and srv_regobj to include all possible choices.
12783 * configure.ac (srv_xmltarget): Remove.
12784 (srv_xmlfiles): Do not add "target.xml".
12785 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12786 checks for supplementary target information.
12787 * configure: Regenerate.
12788 * Makefile.in (XML_TARGET): Remove.
12789 (target.xml): Remove rule.
12790 (clean): Do not clean up target.xml.
12791 (.PRECIOUS): Do not mention target.xml.
12792
12793 * target.h (struct target_ops): Remove arch_string member.
12794 * linux-low.c (linux_arch_string): Remove.
12795 (linux_target_ops): Remove arch_string initializer.
12796 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12797 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12798 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12799 * spu-low.c (spu_arch_string): Remove.
12800 (spu_target_ops): Remove arch_string initializer.
12801 * win32-low.c (win32_arch_string): Remove.
12802 (win32_target_ops): Remove arch_string initializer.
12803 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12804 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12805 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12806
12807 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12808
12809 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12810 by collect_ptrace_register and supply_ptrace_register hooks.
12811 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12812 instead of checking for the_low_target.left_pad_xfer.
12813 (usr_store_inferior_registers): Use collect_ptrace_register callback
12814 instead of checking for the_low_target.left_pad_xfer.
12815
12816 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12817 (s390_supply_ptrace_register): Likewise.
12818 (s390_fill_gregset): Call s390_collect_ptrace_register.
12819 (the_low_target): Update.
12820
12821 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12822 (ppc_supply_ptrace_register): Likewise.
12823 (the_low_target): Update.
12824
12825 * linux-i386-low.c (the_low_target): Update.
12826 * linux-x86-64-low.c (the_low_target): Update.
12827
12828 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12829
12830 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12831 reg-s390.o and reg-s390x.o.
12832
12833 * linux-low.c (new_inferior): New global variable.
12834 (linux_create_inferior, linux_attach): Set it.
12835 (linux_wait_for_process): Call the_low_target.arch_setup after the
12836 target has stopped for the first time.
12837 (initialize_low): Do not call the_low_target.arch_setup.
12838
12839 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12840 (s390_set_pc): Likewise.
12841 (s390_arch_setup): New function.
12842 (the_low_target): Use s390_arch_setup as arch_setup routine.
12843
12844 * regcache.c (realloc_register_cache): New function.
12845 (set_register_cache): Call it for each existing regcache.
12846
12847 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12848
12849 * server.h (init_registers): Remove prototype.
12850
12851 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12852 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12853 instead of init_registers ().
12854 * linux-arm-low.c (init_registers_arm): Add prototype.
12855 (init_registers_arm_with_iwmmxt): Likewise.
12856 (the_low_target): Add initializer for arch_setup field.
12857 * linux-cris-low.c (init_registers_cris): Add prototype.
12858 (the_low_target): Add initializer for arch_setup field.
12859 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12860 (the_low_target): Add initializer for arch_setup field.
12861 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12862 (the_low_target): Add initializer for arch_setup field.
12863 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12864 (the_low_target): Add initializer for arch_setup field.
12865 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12866 (the_low_target): Add initializer for arch_setup field.
12867 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12868 (the_low_target): Add initializer for arch_setup field.
12869 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12870 (init_registers_mips64_linux): Likewise.
12871 (the_low_target): Add initializer for arch_setup field.
12872 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12873 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12874 (the_low_target): Add initializer for arch_setup field.
12875 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12876 (init_registers_powerpc_64): Likewise.
12877 (the_low_target): Add initializer for arch_setup field.
12878 * linux-s390-low.c (init_registers_s390): Add prototype.
12879 (init_registers_s390x): Likewise.
12880 (the_low_target): Add initializer for arch_setup field.
12881 * linux-sh-low.c (init_registers_sh): Add prototype.
12882 (the_low_target): Add initializer for arch_setup field.
12883 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12884 (the_low_target): Add initializer for arch_setup field.
12885 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12886 (the_low_target): Add initializer for arch_setup field.
12887
12888 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12889 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12890 instead of init_registers ().
12891 * win32-arm-low.c (init_registers_arm): Add prototype.
12892 (the_low_target): Add initializer for arch_setup field.
12893 * win32-i386-low.c (init_registers_i386): Add prototype.
12894 (the_low_target): Add initializer for arch_setup field.
12895
12896 * spu-low.c (init_registers_spu): Add prototype.
12897 (initialize_low): Call initialie_registers_spu () instead of
12898 initialize_registers ().
12899
12900 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12901
12902 * server.c (handle_v_requests): When handling the vRun and vAttach
12903 packets, if already debugging a process, don't kill it. Return an
12904 error instead.
12905
12906 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12907
12908 * server.c (handle_query): Correct length check.
12909
12910 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12911
12912 * win32-low.c (do_initial_child_stuff): Add process handle
12913 parameter. Set current_process_handle and current_process_id from the
12914 parameters. Clear globals.
12915 (win32_create_inferior): Don't set current_process_handle and
12916 current_process_id here. Instead pass them on the call to
12917 do_initial_child_stuff.
12918 (win32_attach): Likewise.
12919 (win32_clear_inferiors): New.
12920 (win32_kill): Don't close the current process handle or the
12921 current thread handle here. Instead call win32_clear_inferiors.
12922 (win32_detach): Don't open a new handle to the process. Call
12923 win32_clear_inferiors.
12924 (win32_join): Don't rely on current_process_handle; open a new
12925 handle using the process id.
12926 (win32_wait): Call win32_clear_inferiors when the inferior process
12927 has exited.
12928
12929 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12930
12931 * server.c (monitor_show_help): Add "exit".
12932
12933 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12934
12935 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12936 (clean): Add reg-xtensa.c.
12937 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12938 * configure.srv (xtensa*-*-linux*) New target.
12939 * linux-xtensa-low.c: New.
12940 * xtensa-xtregs.c: New.
12941
12942 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12943
12944 * hostio.c: Don't include errno.h.
12945 (errno_to_fileio_errno): Move to hostio-errno.
12946 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12947 error number outputting to the target->hostio_last_error callback.
12948 (hostio_packet_error): Use FILEIO_EINVAL directly.
12949 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12950 calls to hostio_error.
12951 * hostio-errno.c: New.
12952 * server.h (hostio_last_error_from_errno): Declare.
12953 * target.h (target_ops): Add hostio_last_error member.
12954 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12955 as hostio_last_error handler.
12956 * spu-low.c (spu_target_ops): Likewise.
12957 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12958 (wince_hostio_last_error): New functions.
12959 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12960 as hostio_last_error handler.
12961 (win32_target_ops) [!_WIN32_WCE]: Register
12962 hostio_last_error_from_errno as hostio_last_error handler.
12963 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12964 (hostio-errno.o): New rule.
12965 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12966 * configure.srv (srv_hostio_err_objs): New variable. Default to
12967 hostio-errno.o.
12968 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12969 * configure: Regenerate.
12970
12971 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12972
12973 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12974 (linux_kill, linux_detach): Clean up the process list.
12975 * remote-utils.c (remote_open): Improve port number parsing.
12976 (putpkt_binary, input_interrupt): Only send interrupts if the target
12977 is running.
12978 * server.c (extended_protocol): Make static.
12979 (attached): Define earlier.
12980 (exit_requested, response_needed, program_argv): New variables.
12981 (target_running): New.
12982 (start_inferior): Clear attached here.
12983 (attach_inferior): Set attached here.
12984 (require_running): Define.
12985 (handle_query): Use require_running and target_running. Implement
12986 "monitor exit".
12987 (handle_v_attach, handle_v_run): New.
12988 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12989 (gdbserver_usage): Update.
12990 (main): Redo argument parsing. Handle --debug and --multi. Handle
12991 --attach along with other options or after the port. Save
12992 program_argv. Support no initial program. Resynchronize
12993 communication with GDB after an error. Handle "monitor exit".
12994 Use require_running and target_running. Always allow the extended
12995 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12996 restart in extended mode.
12997 * README: Refer to the GDB manual. Update --attach usage.
12998
12999 2007-12-20 Andreas Schwab <schwab@suse.de>
13000
13001 * linux-low.c (STACK_SIZE): Define.
13002 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13003 (linux_test_for_tracefork): Likewise.
13004
13005 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13006
13007 * linux-low.c (linux_wait_for_event): Update messages. Do not
13008 reinsert auto-delete breakpoints.
13009 * mem-break.c (struct breakpoint): Change return type of handler to
13010 int.
13011 (set_breakpoint_at): Update handler type.
13012 (reinsert_breakpoint_handler): Return 1 instead of calling
13013 delete_breakpoint.
13014 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13015 setting a new one.
13016 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13017 * mem-break.h (set_breakpoint_at): Update handler type.
13018 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13019 * win32-low.c (auto_delete_breakpoint): New.
13020 (get_child_debug_event): Use it.
13021
13022 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13023
13024 * configure.ac: Check for pread and pwrite.
13025 * hostio.c (handle_pread): Fall back to lseek and read.
13026 (handle_pwrite): Fall back to lseek and write.
13027 * config.in, configure: Regenerated.
13028
13029 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13030
13031 * server.c (myresume): Add own_buf argument.
13032 (main): Update calls.
13033
13034 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13035
13036 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13037 * remote-utils.c (remote_open): Do not call disable_async_io.
13038 (block_async_io): Delete.
13039 (unblock_async_io): Make static.
13040 (initialize_async_io): New.
13041 * server.c (handle_v_cont): Handle async I/O here.
13042 (myresume): Likewise. Move other common resume tasks here...
13043 (main): ... from here. Call initialize_async_io. Disable async
13044 I/O before the main loop.
13045 * server.h (initialize_async_io): Declare.
13046 (block_async_io, unblock_async_io): Delete prototypes.
13047 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13048
13049 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13050
13051 * remote-utils.c (readchar): Allow binary data in received messages.
13052
13053 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13054
13055 * win32-low.c (attaching): New global.
13056 (win32_create_inferior): Clear the `attaching' global.
13057 (win32_attach): Set the `attaching' global.
13058 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13059 attaching. Only set a breakpoint at the entry point if not
13060 attaching.
13061
13062 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13063
13064 * server.c (main): Don't report dll events on the initial
13065 connection on attaches.
13066
13067 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13068
13069 * server.c (main): Relax numerical bases supported for the pid of
13070 the --attach command line argument.
13071
13072 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13073
13074 * win32-low.c (win32_attach): Call OpenProcess before
13075 DebugActiveProcess, not after. Add last error output to error
13076 call.
13077
13078 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13079
13080 * win32-low.c (win32_get_thread_context)
13081 (win32_set_thread_context): New functions.
13082 (thread_rec): Use win32_get_thread_context.
13083 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13084 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13085 field.
13086
13087 2007-12-03 Leo Zayas
13088 Pedro Alves <pedro_alves@portugalmail.pt>
13089
13090 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13091 global variables.
13092 (child_add_thread): Minor cleanup.
13093 (child_continue): Resume artificially suspended threads before
13094 calling ContinueDebugEvent.
13095 (suspend_one_thread): New.
13096 (fake_breakpoint_event): New.
13097 (get_child_debug_event): Change return type to int. Check here if
13098 gdb sent an interrupt request. If a soft interrupt was requested,
13099 fake a breakpoint event. Return 0 if there is no event to handle,
13100 and 1 otherwise.
13101 (win32_wait): Don't check here if gdb sent an interrupt request.
13102 Ensure there is a valid event to handle.
13103 (win32_request_interrupt): Add soft interruption method as last
13104 resort.
13105
13106 2007-12-03 Leo Zayas
13107 Pedro Alves <pedro_alves@portugalmail.pt>
13108
13109 * win32-low.h (win32_thread_info): Add descriptions to the
13110 structure members. Replace `suspend_count' counter by a
13111 `suspended' flag.
13112 * win32-low.c (thread_rec): Update condition of when to get the
13113 context from the inferior. Rely on ContextFlags being set if it
13114 has already been retrieved. Only suspend the inferior thread if
13115 we haven't already. Warn if that fails.
13116 (continue_one_thread): s/suspend_count/suspended/. Only call
13117 ResumeThread once. Warn if that fails.
13118
13119 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13120
13121 * win32-low.c (win32_wait): Don't read from the inferior when it
13122 has already exited.
13123
13124 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13125
13126 * Makefile.in (win32_low_h): New variable.
13127 (win32-low.o): Add dependency on $(win32_low_h).
13128 (win32-arm-low.o, win32-i386-low.o): New rules.
13129
13130 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13131
13132 * hostio.c: Correct copyright year.
13133
13134 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13135
13136 * Makefile.in (OBS): Add hostio.o.
13137 (hostio.o): New rule.
13138 * server.h (handle_vFile): Declare.
13139 * hostio.c: New file.
13140 * server.c (handle_v_requests): Take packet_len and new_packet_len
13141 for binary packets. Call handle_vFile.
13142 (main): Update call to handle_v_requests.
13143
13144 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13145
13146 * linux-low.c: Include <sched.h>.
13147
13148 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13149
13150 * linux-low.c (linux_tracefork_grandchild): New.
13151 (linux_tracefork_child): Use clone.
13152 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13153
13154 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13155
13156 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13157
13158 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13159
13160 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13161
13162 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13163
13164 * inferiors.c (change_inferior_id): Delete.
13165 (add_pid_to_list, pull_pid_from_list): New.
13166 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13167 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13168 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13169 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13170 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13171 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13172 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13173 (using_threads): Always set to 1.
13174 (handle_extended_wait): New.
13175 (add_process): Do not set TID.
13176 (linux_create_inferior): Set must_set_ptrace_flags.
13177 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13178 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13179 (linux_thread_alive): Rename TID argument to LWPID.
13180 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13181 (linux_wait_for_event): Do not use TID or check using_threads. Update
13182 call to dead_thread_notify. Call handle_extended_wait.
13183 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13184 (send_sigstop): Delete sigstop_sent.
13185 (wait_for_sigstop): Avoid TID.
13186 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13187 (linux_test_for_tracefork): New.
13188 (linux_lookup_signals): Use thread_db_active and
13189 linux_supports_tracefork_flag.
13190 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13191 * linux-low.h (get_process_thread): Avoid TID.
13192 (struct process_ifo): Move thread_known and tid to the end. Remove
13193 sigstop_sent.
13194 (linux_attach_lwp, thread_db_init): Update prototypes.
13195 * server.h (change_inferior_id): Delete prototype.
13196 (add_pid_to_list, pull_pid_from_list): New prototypes.
13197 * thread-db.c (thread_db_use_events): New.
13198 (find_first_thread): Rename to...
13199 (find_one_thread): ...this. Update callers and messages. Do not
13200 call fatal. Check thread_db_use_events. Do not call
13201 change_inferior_id or new_thread_notify.
13202 (maybe_attach_thread): Update. Do not call new_thread_notify.
13203 (thread_db_init): Set thread_db_use_events. Check use_events.
13204 * utils.c (fatal, warning): Correct message prefix.
13205
13206 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13207
13208 * Makefile.in (clean): Remove new files.
13209 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13210 (powerpc-64.o, powerpc-64.c): New rules.
13211 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13212 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13213 with SPE.
13214 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13215 SPE targets.
13216 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13217 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13218 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13219 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13220 (target_regsets): Add AltiVec and SPE register sets.
13221 * configure.ac: Check for AltiVec and SPE.
13222 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13223 (ppc_fill_vrregset, ppc_store_vrregset): New.
13224 (target_regsets): Add AltiVec register set.
13225 * configure: Regenerated.
13226
13227 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13228
13229 * linux-low.c (O_LARGEFILE): Define.
13230 (linux_read_memory): Use /proc/PID/mem.
13231 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13232 * configure, config.in: Regenerated.
13233
13234 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13235
13236 * linux-low.c (linux_wait_for_event): Do not pass signals while
13237 single-stepping.
13238
13239 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13240
13241 * win32-low.c (create_process): New.
13242 (win32_create_inferior): Use create_process instead of
13243 CreateProcess. If create_process failed retry appending an ".exe"
13244 suffix. Store the GetLastError result immediatelly after
13245 create_process calls and use it on the call to error.
13246
13247 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13248
13249 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13250
13251 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13252
13253 * configure.ac: Switch license to GPLv3.
13254
13255 2007-08-01 Michael Snyder <msnyder@access-company.com>
13256
13257 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13258
13259 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13260
13261 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13262 typedef.
13263 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13264 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13265 CloseToolhelp32Snapshot.
13266 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13267 CloseToolhelp32Snapshot.
13268
13269 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13270
13271 * server.c (main): Check for inferior exit before main loop.
13272
13273 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13274
13275 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13276 instead of on tmp_desc.
13277
13278 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13279 Daniel Jacobowitz <dan@codesourcery.com>
13280
13281 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13282 (add_thread): Minor cleanups.
13283 (clear_inferiors): Move lower in the file. Clear the DLL
13284 list.
13285 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13286 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13287 (xml_escape_text): New.
13288 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13289 for qSupported.
13290 (handle_v_cont): Report errors.
13291 (gdbserver_version): Update.
13292 (main): Correct size of own_buf. Do not report initial DLL events.
13293 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13294 (unloaded_dll, xml_escape_text): New.
13295 * win32-low.c (enum target_waitkind): Update comments.
13296 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13297 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13298 (win32_EnumProcessModules, win32_GetModuleInformation)
13299 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13300 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13301 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13302 (win32_Module32First, win32_Module32Next, load_toolhelp)
13303 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13304 (get_child_debug_event): Handle DLL events.
13305 (win32_wait): Likewise.
13306
13307 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13308
13309 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13310 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13311
13312 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13313
13314 * win32-low.c (handle_output_debug_string): Ignore event if not
13315 waiting.
13316
13317 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13318
13319 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13320
13321 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13322
13323 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13324
13325 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13326
13327 * inferiors.c (change_inferior_id): Add comment.
13328 * linux-low.c (check_removed_breakpoint): Add an early
13329 prototype. Improve debug output.
13330 (linux_attach): Doc update.
13331 (linux_detach_one_process, linux_detach): Clean up before releasing
13332 each process.
13333 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13334 * linux-low.h (struct process_info): Doc improvement.
13335 * mem-break.c (delete_all_breakpoints): New.
13336 * mem-break.h (delete_all_breakpoints): New prototype.
13337 * thread-db.c (find_first_thread): New.
13338 (thread_db_create_event): Call it instead of
13339 thread_db_find_new_threads. Clean up unused variables.
13340 (maybe_attach_thread): Remove first thread handling.
13341 (thread_db_find_new_threads): Use find_first_thread.
13342 (thread_db_get_tls_address): Likewise.
13343
13344 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13345
13346 * thread-db.c (thread_db_find_new_threads): Add prototype.
13347 (thread_db_create_event): Check for the main thread before adding
13348 a new thread.
13349 (maybe_attach_thread): Only enable event reporting if TID == 0.
13350 (thread_db_get_tls_address): Check for new threads.
13351
13352 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13353
13354 * linux-low.c (linux_create_inferior): Try execv before execvp.
13355 * spu-low.c (spu_create_inferior): Likewise.
13356
13357 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13358
13359 * linux-low.c (linux_create_inferior): Change execv to execvp.
13360 * spu-low.c (spu_create_inferior): Likewies.
13361
13362 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13363
13364 * Makefile.in (clean): Clean new files instead of deleted ones.
13365 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13366 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13367 rules.
13368 * configure.srv: Specify XML files and new regformats for MIPS and
13369 MIPS64 GNU/Linux.
13370 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13371 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13372 an entry for the restart register.
13373 (mips_cannot_fetch_register, mips_cannot_store_register)
13374 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13375 register names to match the XML descriptions.
13376 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13377 restart register instead of $0.
13378
13379 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13380 Markus Deuling <deuling@de.ibm.com>
13381
13382 * remote-utils.c (decode_xfer_write): New function.
13383 * server.h (decode_xfer_write): Add prototype.
13384 * server.c (handle_query): Add PACKET_LEN argument. Support
13385 qXfer:spu:read and qXfer:spu:write packets.
13386 (main): Pass packet_len to handle_query.
13387 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13388 * target.h (target_ops): Add qxfer_spu.
13389
13390 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13391
13392 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13393 accessing non-seekable spufs files.
13394
13395 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13396
13397 * server.c (handle_query): Add reply for qC packet.
13398
13399 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13400 Leo Zayas <lerele@champenstudios@com>
13401
13402 * server.h (check_remote_input_interrupt_request): New function.
13403 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13404 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13405 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13406 (check_remote_input_interrupt_request): New function.
13407 * server.h (check_remote_input_interrupt_request): Declare.
13408 * win32-low.c (winapi_DebugBreakProcess,
13409 winapi_GenerateConsoleCtrlEvent): New typedefs.
13410 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13411 to 250 ms.
13412 (win32_wait): Check for remote interrupt request
13413 with check_remote_input_interrupt_request.
13414 (win32_request_interrupt): New function.
13415 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13416
13417 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13418
13419 * win32-low.c (debug_registers_changed,
13420 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13421 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13422 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13423 (thread_rec): Get context using the low target.
13424 (child_add_thread): Call thread_added on the low target,
13425 which does the same thing.
13426 (regptr): Delete.
13427 (do_initial_child_stuff): Remove debug registers references.
13428 Set context using the low target. Resume threads after
13429 setting the contexts.
13430 (child_continue): Remove dead variable. Remove debug
13431 registers references.
13432 (child_fetch_inferior_registers): Go through the low target.
13433 (do_child_store_inferior_registers): Remove.
13434 (child_store_inferior_registers): Go through the low target.
13435 (win32_resume): Remove debug registers references.
13436 Set context using the low target.
13437 (handle_exception): Change return type to void. Don't record
13438 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13439 first chance exception.
13440 (get_child_debug_event): Change return type to void. Remove
13441 goto loop. Always return after waiting for debug event.
13442 (win32_wait): Convert to switch statement. Handle spurious
13443 events.
13444
13445 * win32-i386-low.c (debug_registers_changed,
13446 debug_registers_used): New.
13447 (initial_stuff): Rename to ...
13448 (i386_initial_stuff): ... this. Clear debug registers
13449 state variables.
13450 (store_debug_registers): Delete.
13451 (i386_get_thread_context): New.
13452 (load_debug_registers): Delete.
13453 (i386_set_thread_context): New.
13454 (i386_thread_added): New.
13455 (single_step): Rename to ...
13456 (i386_single_step): ... this.
13457 (do_fetch_inferior_registers): Rename to ...
13458 (i386_fetch_inferior_register): ... this.
13459 (i386_store_inferior_register): New.
13460 (the_low_target): Adapt to new interface.
13461
13462 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13463 (arm_get_thread_context): New.
13464 (arm_set_thread_context): New.
13465 (regptr): New.
13466 (do_fetch_inferior_registers): Rename to ...
13467 (arm_fetch_inferior_register): ... this.
13468 (arm_store_inferior_register): New.
13469 (arm_wince_breakpoint): Reimplement as unsigned long.
13470 (arm_wince_breakpoint_len): Define.
13471 (the_low_target): Adapt to new interface.
13472
13473 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13474 load_debug_registers. Add get_thread_context, set_thread_context,
13475 thread_added and store_inferior_register. Rename
13476 fetch_inferior_registers to fetch_inferior_register.
13477 (regptr): Remove declaration.
13478
13479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13480
13481 * linux-low.c (linux_detach): Change return type to int. Return 0.
13482 * spu-low.c (spu_detach): Likewise.
13483
13484 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13485
13486 * target.h (target_ops): Change return type of detach to int.
13487 Add join.
13488 (join_inferior): New.
13489 * server.c (main): Don't skip detach support on mingw32.
13490 If the inferior doesn't support detaching return error.
13491 Call join_inferior instead of using waitpid.
13492 * linux-low.c (linux_join): New.
13493 (linux_target_op): Add linux_join.
13494 * spu-low.c (spu_join): New.
13495 (spu_target_ops): Add spu_join.
13496 * win32-low.c (win32_detach): Adapt to new interface.
13497 Reopen current_process_handle before detaching. Issue a child
13498 resume before detaching.
13499 (win32_join): New.
13500 (win32_target_op): Add win32_join.
13501
13502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13503
13504 * win32-low.c (win32-attach): Fix return value.
13505 * target.h (target_ops): Describe ATTACH return values.
13506
13507 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13508
13509 * win32-low.c (GETPROCADDRESS): Define.
13510 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13511 (winapi_DebugSetProcessKillOnExit): Likewise.
13512 (win32_create_inferior): Force usage of ansi CreateProcessA.
13513 (win32_attach): Use GETPROCADDRESS.
13514 (win32_detach): Likewise.
13515
13516 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13517
13518 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13519
13520 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13521
13522 * win32-low.c: Commit leftover changes from 2007-03-29.
13523
13524 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13527 fields short instead of int. Add explicit padding.
13528 (i387_cache_to_fsave): Remove unnecessary casts.
13529 (i387_fsave_to_cache): Doc fix.
13530 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13531
13532 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13533
13534 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13535 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13536
13537 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13538
13539 * configure.srv (arm*-*-mingw32ce*): Move near the other
13540 arm targets.
13541
13542 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13543
13544 * configure.ac: Add errno checking.
13545 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13546 sys/file.h and malloc.h.
13547 (AC_CHECK_DECLS): Add perror.
13548 (srv_mingwce): Handle.
13549 * configure.srv (i[34567]86-*-cygwin*): Add
13550 win32-i386-low.o to srv_tgtobj.
13551 (i[34567]86-*-mingw*): Likewise.
13552 (arm*-*-mingw32ce*): Add case.
13553 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13554 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13555 [__MINGW32CE__] (strerror): New function.
13556 [__MINGW32CE__] (errno): Define to GetLastError.
13557 [__MINGW32CE__] (COUNTOF): New macro.
13558 (remote_open): Remove extra close call.
13559 * mem-break.c (delete_breakpoint_at): New function.
13560 * mem-break.h (delete_breakpoint_at): Declare.
13561 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13562 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13563 [USE_WIN32API] (read, write): Add char* casts.
13564 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13565 * server.h: Include wincecompat.h on Windows CE.
13566 [HAVE_ERRNO_H]: Check.
13567 (perror): Declare if not declared.
13568 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13569 (perror_with_name): Remove errno declaration.
13570 * wincecompat.h: New.
13571 * wincecompat.c: New.
13572 * win32-low.h: New.
13573 * win32-arm-low.c: New.
13574 * win32-i386-low.c: New.
13575 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13576 (OUTMSG2): Make it safe.
13577 (_T): New macro.
13578 (COUNTOF): New macro.
13579 (NUM_REGS): Get it from the low target.
13580 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13581 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13582 (thread_rec): Let low target handle debug registers.
13583 (child_add_thread): Likewise.
13584 (child_init_thread_list): Likewise.
13585 (continue_one_thread): Likewise.
13586 (regptr): New.
13587 (do_child_fetch_inferior_registers): Move to ...
13588 * win32-i386-low.c: ... here, and rename to ...
13589 (do_fetch_inferior_registers): ... this.
13590 * win32-low.c (child_fetch_inferior_registers):
13591 Go through the low target.
13592 (do_child_store_inferior_registers): Use regptr.
13593 (strwinerror): New function.
13594 (win32_create_inferior): Handle Windows CE.
13595 Use strwinerror instead of strerror on Windows error
13596 codes. Add program to the error output.
13597 Don't close the main thread handle on Windows CE.
13598 (win32_attach): Use coredll.dll on Windows CE.
13599 (win32_kill): Close current process and current
13600 thread handles.
13601 (win32_detach): Use coredll.dll on Windows CE.
13602 (win32_resume): Let low target handle debug registers, and
13603 step request.
13604 (handle_exception): Add/Remove initial breakpoint. Avoid
13605 non-existant WSTOPSIG on Windows CE.
13606 (win32_read_inferior_memory): Cast to remove warning.
13607 (win32_arch_string): Go through the low target.
13608 (initialize_low): Call set_breakpoint_data with the low
13609 target's breakpoint.
13610 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13611 FOP_REGNUM, mappings): Move to ...
13612 * win32-i386-low.c: ... here.
13613 * win32-low.c (win32_thread_info): Move to ...
13614 * win32-low.h: ... here.
13615 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13616 win32-arm-low.c and wincecompat.c.
13617 (all:): Add $EXEEXT.
13618 (install-only:): Likewise.
13619 (gdbserver:): Likewise.
13620 (gdbreplay:): Likewise.
13621 * config.in: Regenerate.
13622 * configure: Regenerate.
13623
13624 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13625
13626 * win32-low.c: Rename typedef thread_info to
13627 win32_thread_info throughout.
13628
13629 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13630
13631 * win32-i386-low.c: Rename to ...
13632 * win32-low.c: ... this.
13633 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13634 * Makefile.in: Likewise.
13635
13636 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13637
13638 * remote-utils.c (monitor_output): Constify msg parameter.
13639 * server.h (monitor_output): Likewise.
13640 * win32-i386-low.c (handle_output_debug_string): New.
13641 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13642 handle_output_debug_string.
13643 (get_child_debug_event): Likewise.
13644
13645 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13646
13647 * server.c (main): Correct strtoul check.
13648
13649 2007-03-27 Jon Ringle <jon@ringle.org>
13650
13651 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13652
13653 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13654
13655 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13656
13657 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13658
13659 * terminal.h: Check HAVE_SGTTY_H.
13660
13661 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13662
13663 * remote-utils.c (remote_open): Print out the assigned port number.
13664
13665 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13666
13667 * remote-utils.c (monitor_output): New function.
13668 * server.c (debug_threads): Define here.
13669 (monitor_show_help): New function.
13670 (handle_query): Handle qRcmd.
13671 (main): Do not handle 'd' packet.
13672 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13673 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13674 of debug_threads.
13675
13676 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13677
13678 * Makefile.in (EXEEXT): New.
13679 (clean): Use $(EXEEXT).
13680
13681 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13682
13683 * target.h (target_ops): Rename send_signal to request_interrupt,
13684 and remove enum target_signal parameter.
13685 * linux-low.c (linux_request_interrupt): Rename from
13686 linux_send_signal, and always send SIGINT.
13687 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13688 and always send SIGINT.
13689 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13690 of send_signal.
13691 (input_interrupt): Likewise.
13692
13693 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13694
13695 * server.c (get_features_xml): Check if target implemented
13696 arch_string.
13697 * win32-i386-low.c (win32_arch_string): New.
13698 (win32_target_ops): Add win32_arch_string as arch_string member.
13699
13700 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13701
13702 * spu-low.c (spu_arch_string): New.
13703 (spu_target_ops): Add spu_arch_string.
13704
13705 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13706
13707 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13708 * configure.ac: Do not check for terminal.h.
13709 * configure, config.in: Regenerated.
13710
13711 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13712
13713 * Makefile.in (OBS): Add $(XML_BUILTIN).
13714 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13715 (clean): Update.
13716 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13717 (arm-with-iwmmxt.c): New.
13718 * config.in, configure: Regenerate.
13719 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13720 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13721 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13722 (arm*-*-linux*): Add iWMMXt and regset support.
13723 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13724 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13725 (arm_store_wmmxregset, target_regsets): New.
13726 * server.c (get_features_xml): Take annex argument. Check builtin
13727 XML documents.
13728 (handle_query): Handle multiple annexes.
13729
13730 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13731
13732 * remote-utils.c [USE_WIN32API] (read, write): Define.
13733 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13734 write.
13735
13736 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13737
13738 * linux-i386-low.c (the_low_target): Set arch_string.
13739 * linux-x86-64-low.c (the_low_target): Likewise.
13740 * linux-low.c (linux_arch_string): New.
13741 (linux_target_ops): Add it.
13742 * linux-low.h (struct linux_target_ops): Add arch_string.
13743 * server.c (write_qxfer_response): Use const void * for DATA.
13744 (get_features_xml): New.
13745 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13746 * target.h (struct target_ops): Add arch_string method.
13747
13748 2007-01-03 Denis Pilat <denis.pilat@st.com>
13749 Daniel Jacobowitz <dan@codesourcery.com>
13750
13751 * linux-low.c (linux_kill): Handle being called with no threads.
13752 * win32-i386-low.c (win32_kill): Likewise.
13753 (get_child_debug_event): Clear current_process_handle.
13754
13755 2006-12-30 Denis PILAT <denis.pilat@st.com>
13756 Daniel Jacobowitz <dan@codesourcery.com>
13757
13758 * remote-utils.c (remote_open): Check the type of specified
13759 serial port devices before opening them.
13760 * server.c (main): Kill the inferior if an error occurs during
13761 the first remote_open.
13762
13763 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13764
13765 * README: Update supported targets.
13766
13767 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13768
13769 * Makefile.in (clean): Remove reg-mips64.c.
13770 (reg-mips64.c, reg-mips64.o): New rules.
13771 * configure.srv: Handle mips64. Include regset support for mips.
13772 * linux-mips-low.c (union mips_register): New.
13773 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13774 (mips_breakpoint, mips_breakpoint_at): Use int.
13775 (mips_collect_register, mips_supply_register)
13776 (mips_collect_register_32bit, mips_supply_register_32bit)
13777 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13778 (mips_store_fpregset, target_regsets): New.
13779 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13780
13781 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13782
13783 * configure.srv: Add target "spu*-*-*".
13784 * Makefile.in (clean): Remove reg-spu.c.
13785 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13786 * spu-low.c: New file.
13787
13788 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13789
13790 * configure.ac: Correct td_thr_tls_get_addr test.
13791 * configure: Regenerated.
13792
13793 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13794
13795 * linux-low.c (linux_wait_for_event): Reformat. Use the
13796 pass_signals array.
13797 * remote-utils.c (decode_address_to_semicolon): New.
13798 * server.c (pass_signals, handle_general_set): New.
13799 (handle_query): Mention QPassSignals for qSupported.
13800 (main): Call handle_general_set.
13801 * server.h (pass_signals, decode_address_to_semicolon): New.
13802
13803 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * server.c (handle_query): Correct error handling for read_auxv.
13806
13807 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13808
13809 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13810 and srv_linux_thread_db to yes.
13811 * linux-s390-low.c (s390_fill_gregset): New function.
13812 (target_regsets): Define data structure.
13813
13814 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13815
13816 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13817 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13818 * config.in, configure: Regenerated.
13819 * inferiors.c (gdb_id_to_thread): New function.
13820 (gdb_id_to_thread_id): Use it.
13821 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13822 * linux-low.h (struct process_info): Add th member.
13823 (thread_db_get_tls_address): New prototype.
13824 * remote-utils.c (decode_address): Make non-static.
13825 * server.c (handle_query): Handle qGetTLSAddr.
13826 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13827 * target.h (struct target_ops): Add get_tls_address.
13828 * thread-db.c (maybe_attach_thread): Save the thread handle.
13829 (thread_db_get_tls_address): New.
13830
13831 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13832
13833 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13834 (linux_resume_one_process): Take a siginfo_t *. Update all
13835 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13836 (struct pending_signals): Add a siginfo_t.
13837 (linux_wait_for_process): Always set last_status.
13838 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13839 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13840 * linux-low.h (struct process_info): Add last_status.
13841
13842 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13843
13844 * remote-utils.c (try_rle): New function.
13845 (putpkt_binary): Use it.
13846
13847 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13848
13849 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13850 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13851 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13852 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13853 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13854 point registers.
13855
13856 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13857
13858 * server.c (terminal_fd): New variable.
13859 (old_foreground_pgrp): Likewise.
13860 (restore_old_foreground_pgrp): New function.
13861 (start_inferior): Record the terminal file descriptor in terminal_fd
13862 and its original foreground group in old_foreground_pgrp. Register
13863 restore_old_foreground_pgrp with atexit().
13864
13865 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13866
13867 * server.c (handle_query): Correct qPart to qXfer.
13868
13869 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13870
13871 * configure.ac: Check for more headers which are missing on
13872 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13873 * configure.srv: Add Cygwin and mingw32.
13874 * remote-utils.c: Don't include headers unconditionally which
13875 are missing on mingw32. Include <winsock.h> for mingw32.
13876 (remote_open): Adjust for mingw32 support. Flush
13877 standard error after writing to it.
13878 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13879 (unblock_async_io, enable_async_io, disable_async_io)
13880 (readchar, getpkt): Update for Winsock support.
13881 (prepare_resume_reply): Expect a protocol signal number.
13882 * server.c: Disable <sys/wait.h> on mingw32.
13883 (start_inferior): Adjust for mingw32 support. Flush
13884 standard error after writing to it.
13885 (attach_inferior): Likewise. Use protocol signal
13886 numbers.
13887 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13888 and names.
13889 * win32-i386-low.c: New file.
13890 * Makefile.in (XM_CLIBS): Set.
13891 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13892 (win32-i386-low.o): New dependency rule.
13893 * linux-low.c (linux_wait): Use target signal numbers.
13894 * target.h (struct target_ops): Doc fix.
13895 * server.h (target_signal_to_name): New prototype.
13896 * gdbreplay.c: Don't include headers unconditionally which
13897 are missing on mingw32. Include <winsock.h> for mingw32.
13898 (remote_close, remote_open): Adjust for Winsock support.
13899 * configure, config.in: Regenerated.
13900
13901 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13902
13903 * server.c (decode_xfer_read, write_qxfer_response): New.
13904 (handle_query): Take a packet length argument. Handle
13905 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13906 the qSupported response.
13907 (main): Update call to handle_query.
13908
13909 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13912 (putpkt_binary): Renamed from putpkt and adjusted for binary
13913 data.
13914 (putpkt): New wrapper for putpkt_binary.
13915 (readchar): Don't mask off the high bit.
13916 (decode_X_packet): New function.
13917 * server.c (main): Call putpkt_binary if a handler sets the packet
13918 length. Save the length of the incoming packet. Handle 'X'.
13919 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13920
13921 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13922
13923 * server.c (handle_query): Handle qSupported.
13924
13925 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13926
13927 * remote-utils.c (all_symbols_looked_up): New variable.
13928 (look_up_one_symbol): Check it.
13929 * server.h (look_up_one_symbol): New declaration.
13930 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13931
13932 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * Makefile.in (linux-arm-low.o): Update dependencies.
13935 * linux-arm-low.c: Include "gdb_proc_service.h".
13936 (PTRACE_GET_THREAD_AREA): Define.
13937 (ps_get_thread_area): New function.
13938
13939 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13940
13941 * configure.srv (m68k*-*-uclinux*): New target.
13942 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13943 (linux_resume_one_process): Remove extraneous cast.
13944 (linux_read_offsets): New.
13945 (linux_target_op): Add linux_read_offsets on mmuless systems.
13946 * server.c (handle_query): Add qOffsets logic.
13947 * target.h (struct target_ops): Add read_offsets.
13948
13949 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13950
13951 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13952 (PTRACE_GET_THREAD_AREA): Define.
13953 (ps_get_thread_area): New function.
13954 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13955 (linux-x86-64-low.o): Update.
13956
13957 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13958
13959 * configure.ac: Remove checks for prfpregset_t.
13960 * gdb_proc_service.h: New file.
13961 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13962 new "gdb_proc_service.h".
13963 * proc-service.c: Likewise.
13964 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13965 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13966 * Makefile.in (gdb_proc_service_h): Updated.
13967 * configure, config.in: Regenerated.
13968
13969 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13970
13971 * remote-utils.c (prepare_resume_reply): Move declaration
13972 of gdb_id_from_wait to the top of the block.
13973
13974 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * linux-low.c (regsets_store_inferior_registers): Read the regset
13977 from the target before filling it.
13978
13979 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13980
13981 * server.c (attach_inferior): Return SIGTRAP for a successful
13982 attach.
13983
13984 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13985
13986 * Makefile.in (OBS): Add version.o.
13987 (STAGESTUFF): Delete.
13988 (version.o): Add dependencies.
13989 (version.c): Replace rule.
13990 (clean): Remove version.c.
13991 * server.c (gdbserver_version): New.
13992 (gdbserver_usage): Use printf.
13993 (main): Handle --version and --help.
13994 * server.h (version, host_name): Add declarations.
13995
13996 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13997
13998 * linux-arm-low.c:
13999 * linux-arm-low.c:
14000 * inferiors.c:
14001 * i387-fp.h:
14002 * i387-fp.c:
14003 * gdbreplay.c:
14004 * regcache.c:
14005 * proc-service.c:
14006 * mem-break.h:
14007 * mem-break.c:
14008 * linux-x86-64-low.c:
14009 * linux-sh-low.c:
14010 * linux-s390-low.c:
14011 * linux-ppc64-low.c:
14012 * linux-ppc-low.c:
14013 * linux-mips-low.c:
14014 * linux-m68k-low.c:
14015 * linux-m32r-low.c:
14016 * linux-low.h:
14017 * linux-low.c:
14018 * linux-ia64-low.c:
14019 * linux-i386-low.c:
14020 * linux-crisv32-low.c:
14021 * thread-db.c:
14022 * terminal.h:
14023 * target.h:
14024 * target.c:
14025 * server.h:
14026 * server.c:
14027 * remote-utils.c:
14028 * regcache.h:
14029 * utils.c:
14030 * Makefile.in:
14031 * configure.ac:
14032 * gdbserver.1: Add (C) after Copyright. Update the FSF
14033 address.
14034
14035 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14036
14037 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14038 (arm_breakpoint_at): Recognize both breakpoints.
14039 (the_low_target): Use the correct breakpoint instruction.
14040
14041 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14042
14043 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14044 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14045 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14046 (the_low_target): Update.
14047
14048 2005-10-25 Andreas Schwab <schwab@suse.de>
14049
14050 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14051
14052 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14053 (ia64_num_regs): Reduce to 462.
14054
14055 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14056
14057 * acinclude.m4: Correct quoting.
14058 * aclocal.m4: Regenerated.
14059
14060 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14061 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14062 (thread_db_init): Call thread_db_err_str.
14063 * configure.ac: Check for TD_VERSION.
14064 * config.in, configure: Regenerated.
14065
14066 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14067
14068 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14069
14070 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14071
14072 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14073 is not available. Define HAVE_PTRACE_GETREGS if it is.
14074 * config.in, configure: Regenerated.
14075 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14076 * linux-i386-low.c, linux-m68k-low.c: Update to use
14077 HAVE_PTRACE_GETREGS.
14078 * linux-low.c (regsets_fetch_inferior_registers)
14079 (regsets_store_inferior_registers): Only return 0 if we processed
14080 GENERAL_REGS.
14081 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14082 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14083
14084 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14085
14086 * inferiors.c (struct thread_info): Add gdb_id.
14087 (add_thread): Add gdb_id argument.
14088 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14089 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14090 calls to add_thread.
14091 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14092 * server.c (handle_query): Use thread_to_gdb_id.
14093 (handle_v_cont, main): Use gdb_id_to_thread_id.
14094 * server.h (add_thread): Update prototype.
14095 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14096 prototypes.
14097
14098 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14099
14100 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14101 left-padded registers.
14102 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14103 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14104
14105 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14106
14107 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14108 * configure: Regenerate.
14109 * config.in: Regenerate.
14110 * server.h (NEED_DECLARATION_STRERROR):
14111 Replace with !HAVE_DECL_STRERROR.
14112
14113 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * linux-low.c (linux_wait, linux_send_signal): Don't test
14116 an unsigned long variable for > 0 if it could be MAX_ULONG.
14117 * server.c (myresume): Likewise.
14118 * target.c (set_desired_inferior): Likewise.
14119
14120 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14121
14122 * configure.ac: Simplify and improve check for socklen_t.
14123 * configure, config.in: Regenerate.
14124
14125 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14126
14127 * acconfig.h: Remove.
14128 * configure.ac: Add a test for socklen_t. Use three-argument
14129 AC_DEFINE throughout.
14130 * config.in: Regenerated using autoheader 2.59.
14131 * configure: Regenerated.
14132
14133 * gdbreplay.c (socklen_t): Provide a default.
14134 (remote_open): Use socklen_t.
14135 * remote-utils.c (socklen_t): Provide a default.
14136 (remote_open): Use socklen_t.
14137 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14138 unsigned char.
14139
14140 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14141 char for buffers.
14142 * linux-low.c (linux_read_memory, linux_write_memory)
14143 (linux_read_auxv): Likewise.
14144 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14145 (check_mem_write): Likewise.
14146 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14147 Likewise.
14148 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14149 (registers_from_string, register_data): Likewise.
14150 * server.c (handle_query, main): Likewise.
14151 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14152 (decode_M_packet): Likewise.
14153 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14154 * target.h (struct target_ops): Update read_memory, write_memory,
14155 and read_auxv.
14156 (read_inferior_memory, write_inferior_memory): Update.
14157 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14158 to unsigned char *.
14159 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14160 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14161 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14162 linux-s390-low.c, linux-sh-low.c: Update for changes in
14163 read_inferior_memory and the_low_target->breakpoint.
14164
14165 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14168 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14169 * configure.srv: Add powerpc64-*-linux*.
14170 * linux-ppc64-low.c: New file.
14171
14172 2005-05-23 Orjan Friberg <orjanf@axis.com>
14173
14174 * linux-cris-low.c: New file with support for CRIS.
14175 * linux-crisv32-low.c: Ditto for CRISv32.
14176 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14177 (clean): Add reg-cris.c and reg-crisv32.c.
14178 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14179 reg-crisv32.o, and reg-crisv32.c to make rules.
14180 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14181 recognized targets.
14182
14183 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14184
14185 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14186 of sizeof (PTRACE_XFER_TYPE).
14187 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14188
14189 2005-05-12 Orjan Friberg <orjanf@axis.com>
14190
14191 * target.h (struct target_ops): Add insert_watchpoint,
14192 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14193 pointers for hardware watchpoint support.
14194 * linux-low.h (struct linux_target_ops): Ditto.
14195 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14196 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14197 to linux_target_ops.
14198 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14199 reply packet.
14200 * server.c (main): Recognize 'Z' and 'z' packets.
14201
14202 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14203
14204 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14205 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14206 (the_low_target): Add new members.
14207
14208 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * proc-service.c (ps_lgetregs): Search all_processes instead of
14211 all_threads.
14212
14213 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14214
14215 * server.c (start_inferior): Change return type to int.
14216 (attach_inferior): Change sigptr to int *.
14217 (handle_v_cont, handle_v_requests): Change signal to int *.
14218 (main): Change signal to int.
14219
14220 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14221
14222 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14223 * configure.srv: Add m32r*-*-linux*.
14224 * linux-m32r-low.c: New file.
14225
14226 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14229
14230 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14231
14232 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14233 Take unsigned long arguments for PIDs.
14234 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14235 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14236 (wait_for_sigstop, linux_resume_one_process)
14237 (regsets_fetch_inferior_registers, linux_send_signal)
14238 (linux_read_auxv): Likewise. Update the types of variables holding
14239 PIDs. Update format string specifiers.
14240 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14241 * remote-utils.c (prepare_resume_reply): Likewise.
14242 * server.c (cont_thread, general_thread, step_thread)
14243 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14244 unsigned long.
14245 (handle_query): Update format specifiers.
14246 (handle_v_cont, main): Use strtoul for thread IDs.
14247 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14248 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14249 (general_thread, step_thread, thread_from_wait)
14250 (old_thread_from_wait): Update.
14251 * target.h (struct thread_resume): Use unsigned long for THREAD.
14252 (struct target_ops): Use unsigned long for arguments to attach and
14253 thread_alive.
14254
14255 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14256
14257 * acinclude.m4: Include bfd/bfd.m4 directly.
14258 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14259 <agriffis@toolchain.org>.
14260 * aclocal.m4, configure: Regenerated.
14261
14262 2005-01-07 Andrew Cagney <cagney@gnu.org>
14263
14264 * configure.ac: Rename configure.in, require autoconf 2.59.
14265 * configure: Re-generate.
14266
14267 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14268
14269 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14270 LIBS when finished.
14271 * aclocal.m4: Regenerated.
14272 * configure: Regenerated.
14273
14274 2004-11-21 Andreas Schwab <schwab@suse.de>
14275
14276 * linux-m68k-low.c (m68k_num_gregs): Define.
14277 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14278 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14279 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14280 (m68k_breakpoint_at): New. Add to the_low_target.
14281
14282 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14283 srv_linux_thread_db to yes.
14284
14285 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14286
14287 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14288 (ARCH_SET_FS): Likewise.
14289 (ARCH_GET_FS): Likewise.
14290 (ARCH_GET_GS): Likewise.
14291
14292 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14293
14294 * linux-i386-low.c (ps_get_thread_area): New.
14295 * linux-x86-64-low.c (ps_get_thread_area): New.
14296 * linux-low.c: Include <sys/syscall.h>.
14297 (linux_kill_one_process): Don't kill the first thread here.
14298 (linux_kill): Kill the first thread here.
14299 (kill_lwp): New function.
14300 (send_sigstop, linux_send_signal): Use it.
14301 * proc-service.c: Clean up #ifdefs.
14302 (fpregset_info): Delete.
14303 (ps_lgetregs): Update and enable implementation.
14304 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14305 implementations.
14306 * remote-utils.c (struct sym_cache, symbol_cache): New.
14307 (input_interrupt): Print a clearer message.
14308 (async_io_enabled): New variable.
14309 (enable_async_io, disable_async_io): Use it. Update comments.
14310 (look_up_one_symbol): Use the symbol cache.
14311 * thread-db.c (thread_db_look_up_symbols): New function.
14312 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14313
14314 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14315
14316 * configure.in: Test for -rdynamic.
14317 * configure: Regenerated.
14318 * Makefile (INTERNAL_LDFLAGS): New.
14319 (gdbserver, gdbreplay): Use it.
14320
14321 2004-09-02 Andrew Cagney <cagney@gnu.org>
14322
14323 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14324
14325 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14326
14327 * linux-low.c (linux_wait): Clear all_processes list also.
14328
14329 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14330
14331 * linux-low.c: Include <errno.h>. Remove extern declaration of
14332 errno.
14333
14334 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14335
14336 * gdbreplay.c, server.h, utils.c: Update copyright years.
14337
14338 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14339
14340 * server.c (main): Print child status or termination signal from
14341 variable 'signal', not 'sig'.
14342
14343 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14344
14345 * linux-low.c (linux_read_memory): Change return type to
14346 int. Check for and return error from ptrace().
14347 * target.c (read_inferior_memory): Change return type to int. Pass
14348 back return status from the_target->read_memory().
14349 * target.h (struct target_ops): Adapt *read_memory() prototype.
14350 Update comment.
14351 (read_inferior_memory): Adapt prototype.
14352 * server.c (main): Return an error packet if
14353 read_inferior_memory() returns an error.
14354
14355 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14356
14357 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14358 Unify with other clean targets.
14359
14360 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14361
14362 * server.c (handle_v_cont): Call set_desired_inferior.
14363
14364 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14365
14366 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14367
14368 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14369
14370 * linux-low.c (linux_wait): Unblock async I/O.
14371 (linux_resume): Block and enable async I/O.
14372 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14373 * server.h (block_async_io, unblock_async_io): Add prototypes.
14374
14375 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14376
14377 * remote-utils.c (remote_open): Print a status notice after
14378 opening a TCP port.
14379 * server.c (attach_inferior): Print a status notice after
14380 attaching.
14381
14382 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14383
14384 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14385
14386 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14387
14388 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14389 error packet.
14390 * server.c, target.h: Update copyright years.
14391
14392 2004-02-25 Roland McGrath <roland@redhat.com>
14393
14394 * target.h (struct target_ops): New member `read_auxv'.
14395 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14396 * linux-low.c (linux_read_auxv): New function.
14397 (linux_target_ops): Initialize `read_auxv' member to that.
14398
14399 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14400
14401 Committed by Jim Blandy <jimb@redhat.com>.
14402
14403 * linux-s390-low.c (s390_num_regs): Update.
14404 (s390_regmap): Remove control registers. Use __s390x__ predefine
14405 instead of GPR_SIZE to distiguish s390 and s390x targets.
14406
14407 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14408
14409 * linux-low.c: Update copyright year.
14410 (check_removed_breakpoint): Clear pending_is_breakpoint.
14411 (linux_set_resume_request, linux_queue_one_thread)
14412 (resume_status_pending_p): New functions.
14413 (linux_continue_one_thread): Use process->resume.
14414 (linux_resume): Only resume threads if there are no pending events.
14415 * linux-low.h (struct process_info): Add resume request
14416 pointer.
14417
14418 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14419
14420 * regcache.c (new_register_cache): Clear the allocated register
14421 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14422
14423 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14424
14425 * linux-low.c (linux_resume): Take a struct thread_resume *
14426 argument.
14427 (linux_wait): Update call.
14428 (resume_ptr): New static variable.
14429 (linux_continue_one_thread): Renamed from
14430 linux_continue_one_process. Use resume_ptr.
14431 (linux_resume): Use linux_continue_one_thread.
14432 * server.c (handle_v_cont, handle_v_requests): New functions.
14433 (myresume): New function.
14434 (main): Handle 'v' case.
14435 * target.h (struct thread_resume): New type.
14436 (struct target_ops): Change argument of "resume" to struct
14437 thread_resume *.
14438 (myresume): Delete macro.
14439
14440 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14441
14442 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14443 (uninstall): Support DESTDIR.
14444
14445 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14446
14447 * configure.srv: Add xscale*linux copy of arm*linux entry.
14448
14449 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14450
14451 * linux-arm-low.c (arm_reinsert_addr): New function.
14452 (the_low_target): Add arm_reinsert_addr.
14453
14454 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14455
14456 * mem-break.c: Remove whitespace at end of file.
14457
14458 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14459
14460 * configure.in: Check whether we need to prototype strerror.
14461 * server.h: Optionally prototype strerror.
14462 * gdbreplay.c (perror_with_name): Use strerror.
14463 * linux-low.c (linux_attach_lwp): Use strerror.
14464 * utils.c (perror_with_name): Use strerror.
14465 * config.in, configure: Regenerated.
14466
14467 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14468
14469 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14470 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14471
14472 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14473
14474 * Makefile.in (SFILES): Update.
14475 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14476 low-sun3.c: Remove files.
14477
14478 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14479
14480 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14481 (linux_detach_one_process, linux_detach): New functions.
14482 (linux_target_ops): Add linux_detach.
14483 * server.c (main): Handle 'D' packet.
14484 * target.h (struct target_ops): Add "detach" member.
14485 (detach_inferior): Define.
14486
14487 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14488
14489 From Kelley Cook <kelleycook@wideopenwest.com>:
14490 * configure.srv: Accept i[34567]86 variants.
14491
14492 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14493
14494 * linux-low.c (linux_wait_for_event): Correct comment typos.
14495 (linux_resume_one_process): Call check_removed_breakpoint.
14496 (linux_send_signal): New function.
14497 (linux_target_ops): Add linux_send_signal.
14498 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14499 of kill.
14500 * target.h (struct target_ops): Add send_signal.
14501
14502 2003-05-29 Jim Blandy <jimb@redhat.com>
14503
14504 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14505 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14506 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14507 away part of the register's value.
14508
14509 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14510
14511 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14512 (linux_wait_for_event, linux_init_signals): Likewise.
14513
14514 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14515
14516 * configure.in: Check for stdlib.h.
14517 * configure: Regenerated.
14518 * config.in: Regenerated.
14519
14520 2003-01-04 Andreas Schwab <schwab@suse.de>
14521
14522 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14523
14524 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14525
14526 * Makefile.in: Remove obsolete code.
14527
14528 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14529
14530 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14531 defined(PT_FPR0_HI).
14532
14533 2002-11-17 Stuart Hughes <seh@zee2.com>
14534
14535 * linux-arm-low.c (arm_num_regs): Increase.
14536 (arm_regmap): Include status register.
14537
14538 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14539
14540 * linux-low.c (register_addr): Remove incorrect -1 check.
14541
14542 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14543
14544 * linux-low.c (linux_create_inferior): Call setpgid. Return
14545 the new PID.
14546 (unstopped_p, linux_signal_pid): Remove.
14547 (linux_target_ops): Remove linux_signal_pid.
14548 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14549 global instead of target method.
14550 * target.h (struct target_ops): Remove signal_pid. Update comment
14551 for create_inferior.
14552 * server.c (signal_pid): New variable.
14553 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14554 gdbserver. Set the child to be the foreground process group.
14555 (attach_inferior): Set signal_pid.
14556
14557 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14558
14559 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14560
14561 2002-08-20 Jim Blandy <jimb@redhat.com>
14562
14563 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14564 default for this.
14565
14566 2002-08-01 Andrew Cagney <cagney@redhat.com>
14567
14568 * Makefile.in: Make chill references obsolete.
14569
14570 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14571
14572 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14573 * configure: Regenerate.
14574 * config.in: Regenerate.
14575
14576 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14577
14578 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14579 (perror_with_name, remote_close, remote_open, expect, play): Static.
14580
14581 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14582
14583 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14584 byte offsets instead of an array of indexes.
14585 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14586
14587 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14588
14589 * regcache.c: Add comment.
14590
14591 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14592
14593 * thread-db.c: New file.
14594 * proc-service.c: New file.
14595 * acinclude.m4: New file.
14596 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14597 proc-service.o, and thread-db.o.
14598 (linux-low.o): Add USE_THREAD_DB.
14599 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14600 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14601 * aclocal.m4: Regenerated.
14602 * config.in: Regenerated.
14603 * configure: Regenerated.
14604 * configure.in: Check for proc_service.h, sys/procfs.h,
14605 thread_db.h, and linux/elf.h headrs.
14606 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14607 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14608 Check for -lthread_db and thread support.
14609 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14610 PowerPC, and SuperH.
14611 * i387-fp.c: Constify arguments.
14612 * i387-fp.h: Likewise.
14613 * inferiors.c: (struct thread_info): Renamed from
14614 `struct inferior_info'. Remove PID member. Use generic inferior
14615 list header. All uses updated.
14616 (inferiors, signal_pid): Removed.
14617 (all_threads): New variable.
14618 (get_thread): Define.
14619 (add_inferior_to_list): New function.
14620 (for_each_inferior): New function.
14621 (change_inferior_id): New function.
14622 (add_inferior): Removed.
14623 (remove_inferior): New function.
14624 (add_thread): New function.
14625 (free_one_thread): New function.
14626 (remove_thread): New function.
14627 (clear_inferiors): Use for_each_inferior and free_one_thread.
14628 (find_inferior): New function.
14629 (find_inferior_id): New function.
14630 (inferior_target_data): Update argument type.
14631 (set_inferior_target_data): Likewise.
14632 (inferior_regcache_data): Likewise.
14633 (set_inferior_regcache_data): Likewise.
14634 * linux-low.c (linux_bp_reinsert): Remove.
14635 (all_processes, stopping_threads, using_thrads)
14636 (struct pending_signals, debug_threads, pid_of): New.
14637 (inferior_pid): Replace with macro.
14638 (struct inferior_linux_data): Remove.
14639 (get_stop_pc, add_process): New functions.
14640 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14641 Use add_process and add_thread.
14642 (linux_attach_lwp): New function, based on old linux_attach. Use
14643 add_process and add_thread. Set stop_expected for new threads.
14644 (linux_attach): New function.
14645 (linux_kill_one_process): New function.
14646 (linux_kill): Kill all LWPs.
14647 (linux_thread_alive): Use find_inferior_id.
14648 (check_removed_breakpoints, status_pending_p): New functions.
14649 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14650 Update. Use WNOHANG. Wait for cloned processes also. Update process
14651 struct for the found process.
14652 (linux_wait_for_event): New function.
14653 (linux_wait): Use it. Support LWPs.
14654 (send_sigstop, wait_for_sigstop, stop_all_processes)
14655 (linux_resume_one_process, linux_continue_one_process): New functions.
14656 (linux_resume): Support LWPs.
14657 (REGISTER_RAW_SIZE): Remove.
14658 (fetch_register): Use register_size instead. Call supply_register.
14659 (usr_store_inferior_registers): Likewise. Call collect_register.
14660 Fix recursive case.
14661 (regsets_fetch_inferior_registers): Improve error message.
14662 (regsets_store_inferior_registers): Add debugging.
14663 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14664 (unstopped_p, linux_signal_pid): New functions.
14665 (linux_target_ops): Add linux_signal_pid.
14666 (linux_init_signals): New function.
14667 (initialize_low): Call it. Initialize using_threads.
14668 * regcache.c (inferior_regcache_data): Add valid
14669 flag.
14670 (get_regcache): Fetch registers lazily. Add fetch argument
14671 and update all callers.
14672 (regcache_invalidate_one, regcache_invalidate): New
14673 functions.
14674 (new_register_cache): Renamed from create_register_cache.
14675 Return the new regcache.
14676 (free_register_cache): Change argument to a void *.
14677 (registers_to_string, registers_from_string): Call get_regcache
14678 with fetch flag set.
14679 (register_data): Make static. Pass fetch flag to get_regcache.
14680 (supply_register): Call get_regcache with fetch flag clear.
14681 (collect_register): Call get_regcache with fetch flag set.
14682 (collect_register_as_string): New function.
14683 * regcache.h: Update.
14684 * remote-utils.c (putpkt): Flush after debug output and use
14685 stderr.
14686 Handle input interrupts while waiting for an ACK.
14687 (input_interrupt): Use signal_pid method.
14688 (getpkt): Flush after debug output and use stderr.
14689 (outreg): Use collect_register_as_string.
14690 (new_thread_notify, dead_thread_notify): New functions.
14691 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14692 and general_thread.
14693 (look_up_one_symbol): Flush after debug output.
14694 * server.c (step_thread, server_waiting): New variables.
14695 (start_inferior): Don't use signal_pid. Update call to mywait.
14696 (attach_inferior): Update call to mywait.
14697 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14698 (main): Don't fetch/store registers explicitly. Use
14699 set_desired_inferior. Support proposed ``Hs'' packet. Update
14700 calls to mywait.
14701 * server.h: Update.
14702 (struct inferior_list, struct_inferior_list_entry): New.
14703 * target.c (set_desired_inferior): New.
14704 (write_inferior_memory): Constify.
14705 (mywait): New function.
14706 * target.h: Update.
14707 (struct target_ops): New signal_pid method.
14708 (mywait): Removed macro, added prototype.
14709
14710 * linux-low.h (regset_func): Removed.
14711 (regset_fill_func, regset_store_func): New.
14712 (enum regset_type): New.
14713 (struct regset_info): Add type field. Use new operation types.
14714 (struct linux_target_ops): stop_pc renamed to get_pc.
14715 Add decr_pc_after_break and breakpoint_at.
14716 (get_process, get_thread_proess, get_process_thread)
14717 (strut process_info, all_processes, linux_attach_lwp)
14718 (thread_db_init): New.
14719
14720 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14721 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14722 (the_low_target): Add new members.
14723 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14724 (i386_store_fpxregset): Constify.
14725 (target_regsets): Add new kind identifier.
14726 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14727 (i386_set_pc): Add debugging.
14728 (i386_breakpoint_at): New function.
14729 (the_low_target): Add new members.
14730 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14731 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14732 (mips_breakpoint_at): New.
14733 (the_low_target): Add new members.
14734 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14735 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14736 (the_low_target): Add new members.
14737 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14738 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14739 (the_low_target): Add new members.
14740 * linux-x86-64-low.c (target_regsets): Add new kind
14741 identifier.
14742
14743 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14744
14745 From Martin Pool <mbp@samba.org>:
14746 * server.c (gdbserver_usage): New function.
14747 (main): Call it.
14748
14749 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14750
14751 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14752 stop_at -> stop_pc.
14753
14754 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14755
14756 * Makefile.in: Remove obsolete code.
14757
14758 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14759
14760 * linux-low.c (regsets_fetch_inferior_registers),
14761 (regsets_store_inferior_registers): Removed cast to int from
14762 ptrace() calls.
14763 * regcache.h: Added declaration of struct inferior_info.
14764
14765 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14766
14767 * inferiors.c (struct inferior_info): Add regcache_data.
14768 (add_inferior): Call create_register_cache.
14769 (clear_inferiors): Call free_register_cache.
14770 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14771 * regcache.c (struct inferior_regcache_data): New.
14772 (registers): Remove.
14773 (get_regcache): New function.
14774 (create_register_cache, free_register_cache): New functions.
14775 (set_register_cache): Don't initialize the register cache here.
14776 (registers_to_string, registers_from_string, register_data): Call
14777 get_regcache.
14778 * regcache.h: Add prototypes.
14779 * server.h: Likewise.
14780
14781 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14782
14783 * mem-break.c: New file.
14784 * mem-break.h: New file.
14785 * Makefile.in: Add mem-break.o rule; update server.h
14786 dependencies.
14787 * inferiors.c (struct inferior_info): Add target_data
14788 member.
14789 (clear_inferiors): Free target_data member if set.
14790 (inferior_target_data, set_inferior_target_data): New functions.
14791 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14792 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14793 * linux-low.c (linux_bp_reinsert): New variable.
14794 (struct inferior_linux_data): New.
14795 (linux_create_inferior): Use set_inferior_target_data.
14796 (linux_attach): Likewise. Call add_inferior.
14797 (linux_wait_for_one_inferior): New function.
14798 (linux_wait): Call it.
14799 (linux_write_memory): Add const.
14800 (initialize_low): Call set_breakpoint_data.
14801 * linux-low.h (struct linux_target_ops): Add breakpoint
14802 handling members.
14803 * server.c (attach_inferior): Remove extra add_inferior
14804 call.
14805 * server.h: Include mem-break.h. Update inferior.c
14806 prototypes.
14807 * target.c (read_inferior_memory)
14808 (write_inferior_memory): New functions.
14809 * target.h (read_inferior_memory)
14810 (write_inferior_memory): Change macros to prototypes.
14811 (struct target_ops): Update comments. Add const to write_memory
14812 definition.
14813
14814 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14815
14816 * linux-low.c (usr_store_inferior_registers): Support
14817 registers which are allowed to fail to store.
14818 * linux-low.h (linux_target_ops): Likewise.
14819 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14820 (ppc_cannot_store_register): FPSCR may not be storable.
14821
14822 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14823
14824 * server.h: Include <string.h> if HAVE_STRING_H.
14825 * ChangeLog: Correct paths in last ChangeLog entry.
14826
14827 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14828
14829 * linux-low.h: Remove obsolete prototypes.
14830 (struct linux_target_ops): New.
14831 (extern the_low_target): New.
14832 * linux-low.c (num_regs, regmap): Remove declarations.
14833 (register_addr): Use the_low_target explicitly.
14834 (fetch_register): Likewise.
14835 (usr_fetch_inferior_registers): Likewise.
14836 (usr_store_inferior_registers): Likewise.
14837 * linux-arm-low.c (num_regs): Remove.
14838 (arm_num_regs): Define.
14839 (arm_regmap): Renamed from regmap, made static.
14840 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14841 made static.
14842 (arm_cannot_store_register): Renamed from cannot_store_register,
14843 made static.
14844 (the_low_target): New.
14845 * linux-i386-low.c (num_regs): Remove.
14846 (i386_num_regs): Define.
14847 (i386_regmap): Renamed from regmap, made static.
14848 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14849 made static.
14850 (i386_cannot_store_register): Renamed from cannot_store_register,
14851 made static.
14852 (the_low_target): New.
14853 * linux-ia64-low.c (num_regs): Remove.
14854 (ia64_num_regs): Define.
14855 (ia64_regmap): Renamed from regmap, made static.
14856 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14857 made static.
14858 (ia64_cannot_store_register): Renamed from cannot_store_register,
14859 made static.
14860 (the_low_target): New.
14861 * linux-m68k-low.c (num_regs): Remove.
14862 (m68k_num_regs): Define.
14863 (m68k_regmap): Renamed from regmap, made static.
14864 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14865 made static.
14866 (m68k_cannot_store_register): Renamed from cannot_store_register,
14867 made static.
14868 (the_low_target): New.
14869 * linux-mips-low.c (num_regs): Remove.
14870 (mips_num_regs): Define.
14871 (mips_regmap): Renamed from regmap, made static.
14872 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14873 made static.
14874 (mips_cannot_store_register): Renamed from cannot_store_register,
14875 made static.
14876 (the_low_target): New.
14877 * linux-ppc-low.c (num_regs): Remove.
14878 (ppc_num_regs): Define.
14879 (ppc_regmap): Renamed from regmap, made static.
14880 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14881 made static.
14882 (ppc_cannot_store_register): Renamed from cannot_store_register,
14883 made static.
14884 (the_low_target): New.
14885 * linux-s390-low.c (num_regs): Remove.
14886 (s390_num_regs): Define.
14887 (s390_regmap): Renamed from regmap, made static.
14888 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14889 made static.
14890 (s390_cannot_store_register): Renamed from cannot_store_register,
14891 made static.
14892 (the_low_target): New.
14893 * linux-sh-low.c (num_regs): Remove.
14894 (sh_num_regs): Define.
14895 (sh_regmap): Renamed from regmap, made static.
14896 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14897 made static.
14898 (sh_cannot_store_register): Renamed from cannot_store_register,
14899 made static.
14900 (the_low_target): New.
14901 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14902 (the_low_target): New.
14903
14904 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14905
14906 * Makefile.in: Add stamp-h target.
14907 * configure.in: Create stamp-h.
14908 * configure: Regenerated.
14909
14910 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14911
14912 * inferiors.c: New file.
14913 * target.c: New file.
14914 * target.h: New file.
14915 * Makefile.in: Add target.o and inferiors.o. Update
14916 dependencies.
14917 * linux-low.c (inferior_pid): New static variable,
14918 moved from server.c.
14919 (linux_create_inferior): Renamed from create_inferior.
14920 Call add_inferior. Return 0 on success instead of a PID.
14921 (linux_attach): Renamed from myattach.
14922 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14923 (linux_thread_alive): Renamed from mythread_alive.
14924 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14925 child dies.
14926 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14927 (regsets_store_inferior_registers): Correct error message.
14928 Add missing ``return 0''.
14929 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14930 (linux_store_registers): Renamed from store_inferior_registers.
14931 (linux_read_memory): Renamed from read_inferior_memory.
14932 (linux_write_memory): Renamed from write_inferior_memory.
14933 (linux_target_ops): New structure.
14934 (initialize_low): Call set_target_ops ().
14935 * remote-utils.c (unhexify): New function.
14936 (hexify): New function.
14937 (input_interrupt): Send signals to ``signal_pid''.
14938 * server.c (inferior_pid): Remove.
14939 (start_inferior): Update create_inferior call.
14940 (attach_inferior): Call add_inferior.
14941 (handle_query): New function.
14942 (main): Call handle_query for `q' packets.
14943 * server.h: Include "target.h". Remove obsolete prototypes.
14944 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14945
14946 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14947
14948 * Makefile.in: Add WARN_CFLAGS. Update configury
14949 dependencies.
14950 * configure.in: Check for <string.h>
14951 * configure: Regenerate.
14952 * config.in: Regenerate.
14953 * gdbreplay.c: Include needed system headers.
14954 (remote_open): Remove strchr prototype.
14955 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14956 * regcache.c (supply_register): Change buf argument to const void *.
14957 (supply_register_by_name): Likewise.
14958 (collect_register): Change buf argument to void *.
14959 (collect_register_by_name): Likewise.
14960 * regcache.h: Add missing prototypes.
14961 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14962 * server.c (handle_query): New function.
14963 (attached): New static variable, moved out of main.
14964 (main): Quiet longjmp clobber warnings.
14965 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14966 * utils.c (error): Remove NORETURN.
14967 (fatal): Likewise.
This page took 0.364202 seconds and 3 git commands to generate.