]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Remove pid_to_ptid
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f2907e49
TT
12018-07-03 Tom Tromey <tom@tromey.com>
2
3 * linux-low.c: Update.
4 * linux-ppc-low.c: Update.
5 * linux-x86-low.c: Update.
6 * proc-service.c: Update.
7 * server.c: Update.
8 * spu-low.c: Update.
9 * thread-db.c: Update.
10 * win32-low.c: Update.
11
fd79271b
TT
122018-07-03 Tom Tromey <tom@tromey.com>
13
14 * linux-low.c: Update.
15 * lynx-low.c: Update.
16 * nto-low.c: Update.
17 * remote-utils.c: Update.
18 * spu-low.c: Update.
19 * thread-db.c: Update.
20 * win32-low.c: Update.
21
c0867626
SDJ
222018-06-29 Joel Brobecker <brobecker@adacore.com>
23
24 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
25 parameter in call to 'amd64_create_target_description'.
26
2512d7ef
JK
272018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
28
29 * x86-tdesc.h: Remove executable permission flag.
30
d0ac1c44
SM
312018-06-19 Simon Marchi <simon.marchi@ericsson.com>
32
33 * configure.ac: Remove AC_PREREQ, add missing quoting.
34 * configure: Re-generate.
35 * config.in: Re-generate.
36 * aclocal.m4: Re-generate.
37
c4eb05ff
SM
382018-06-18 Simon Marchi <simon.marchi@ericsson.com>
39
40 * tracepoint.h (current_traceframe): Remove declaration.
41
02895270
AH
422018-06-18 Alan Hayward <alan.hayward@arm.com>
43
44 * linux-aarch64-low.c (is_sve_tdesc): New function.
45 (aarch64_sve_regs_copy_to_regcache): Likewise.
46 (aarch64_sve_regs_copy_from_regcache): Likewise.
47 (aarch64_regs_info): Add SVE checks.
48 (initialize_low_arch): Initialize SVE.
49
e9902bfc
AH
502018-06-18 Alan Hayward <alan.hayward@arm.com>
51
52 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
53
fefa175e
AH
542018-06-11 Alan Hayward <alan.hayward@arm.com>
55
56 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
57 (initialize_low_tracepoint): Likewise
58 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
59 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
60 param.
61 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
62 checks.
63 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
64
b91ad3ff
AH
652018-06-11 Alan Hayward <alan.hayward@arm.com>
66
67 * server.h (PBUFSIZ): Increase size
68
f868386e
AH
692018-06-11 Alan Hayward <alan.hayward@arm.com>
70
71 * regcache.c (regcache::raw_compare): New function.
72 * regcache.h (regcache::raw_compare): New declaration.
73
9c861883
AH
742018-06-11 Alan Hayward <alan.hayward@arm.com>
75
76 * regcache.c (new_register_cache): Use new.
77 (free_register_cache): Use delete.
78 (register_data): Use const.
79 (supply_register): Move body inside regcache.
80 (regcache::raw_supply): New override function.
81 (collect_register): Move body inside regcache.
82 (regcache::raw_collect): New override function.
83 (regcache::get_register_status): New override function.
84 * regcache.h (struct regcache): Inherit from reg_buffer_common.
85
40591844
TT
862018-06-09 Tom Tromey <tom@tromey.com>
87
88 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
89 declare queue.
90 (event_queue): Use std::queue.
91 (gdb_event_xfree): Remove.
92 (initialize_event_loop, process_event, wait_for_event): Update.
93
6341380d
SC
942018-06-08 Stan Cox <scox@redhat.com>
95
96 * win32-low.c (win32_create_inferior): last_ptid and last_status
97 moved to client_state.
98
03349c93
PA
992018-06-08 Pedro Alves <palves@redhat.com>
100
101 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
102 common/common-exceptions.o, common/common-utils.o,
103 common/errors.o, common/print-utils.o and utils.o.
104 * gdbreplay.c: Include "common-defs.h" instead of the two
105 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
106 string.h or alloca.h.
107 (perror_with_name): Delete.
108 (remote_open): Use xstrdup instead of strdup.
109 (main): Rename to ...
110 (captured_main): ... this.
111 (main): New.
112
8dcc53b3
TT
1132018-06-08 Tom Tromey <tom@tromey.com>
114
115 * linux-low.c (linux_low_read_btrace): Update.
116
c12a5089
SC
1172018-06-04 Stan Cox <scox@redhat.com>
118
119 * server.h (struct client_state): New.
120 * server.c (cont_thread, general_thread, multi_process)
121 (report_fork_events, report_vfork_events, report_exec_events)
122 (report_thread_events, swbreak_feature, hwbreak_feature)
123 (vCont_supported, disable_randomization, pass_signals)
124 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
125 Moved to client_state.
126 * remote-utils.c (remote_debug, noack_mode)
127 (transport_is_reliable): Moved to client_state.
128 * tracepoint.c (current_traceframe): Moved to client_state.
129
130 Update all callers.
131 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
132 linux-low.c, remote-utils.h, target.c: Use client_state.
133
122394f1
AH
1342018-05-31 Alan Hayward <alan.hayward@arm.com>
135
136 * configure.srv: Add new c/h file.
137
95228a0d
AH
1382018-05-31 Alan Hayward <alan.hayward@arm.com>
139
140 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
141 null VQ.
142
d8dab6c3
MR
1432018-05-25 Maciej W. Rozycki <macro@mips.com>
144
145 * gdb.arch/mips-fpregset-core.exp: New test.
146 * gdb.arch/mips-fpregset-core.c: New test source.
147
81e25b7c
EK
1482018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
149
150 PR server/23198
151 * hostio.c (require_int): Do not report overflow for integers
152 between 0xfffffff and 0x7fffffff.
153
7e947ad3
MR
1542018-05-22 Maciej W. Rozycki <macro@mips.com>
155
156 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
157 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
158 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
159 functions.
160 (the_low_target): Wire them.
161
1d75a658
PFC
1622018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
163
164 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
165 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
166 mode. Call collect_register_by_name with vscr using
167 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
168 (ppc_store_vrregset): Add and set vscr_offset variable as in
169 ppc_fill_vrregset. Call supply_register_by_name with vscr using
170 vscr_offset.
171
d078308a
PFC
1722018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
173
174 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
175 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
176 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
177
7273b5fc
PFC
1782018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
179
180 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
181 (ppc_store_vsxregset): Likewise.
182 (ppc_fill_vrregset): Likewise.
183 (ppc_store_vrregset): Likewise.
184 (ppc_fill_evrregset): Likewise.
185 (ppc_store_evrregset): Likewise.
186 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
187 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
188 needed.
189
2e077f5e
PFC
1902018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
191
192 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
193 wordsize of the inferior. Call ppc_linux_target_wordsize.
194
bd64614e
PFC
1952018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
196
197 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
198 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
199 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
200 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
201 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
202 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
203 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
204 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
205 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
206 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
207 (tdesc_powerpc_e500l): Remove.
208 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
209 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
210 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
211 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
212 linux-ppc-tdesc.h.
213 (ppc_arch_setup): Remove target description matching code. Fill a
214 ppc_linux_features struct and call ppc_linux_match_description
215 with it.
216
75d74cca
MR
2172018-05-22 Maciej W. Rozycki <macro@mips.com>
218
219 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
220 width of the requested register exceeds the width of the
221 `ptrace' data type.
222 (mips_cannot_store_register): Likewise.
223
e4439e43
MR
2242018-05-21 Maciej W. Rozycki <macro@mips.com>
225
226 * linux-mips-low.c (mips_fetch_register): New function. Update
227 preceding comment.
228 (mips_store_gregset): Supply 0 rather than $restart for $zero.
229 (the_low_target): Wire `mips_fetch_register'.
230
55271bf9
JB
2312018-05-10 Joel Brobecker <brobecker@adacore.com>
232
233 * lynx-i386-low.c (LYNXOS_178): New macro.
234 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
235 the layout on LynxOS-178.
236 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
237 handle floating point registers that are not supported by
238 LynxOS-178.
239
1a34f210
TT
2402018-05-10 Tom Tromey <tom@tromey.com>
241
242 * configure: Rebuild.
243
190852c8
JB
2442018-05-10 Joel Brobecker <brobecker@adacore.com>
245
246 PR server/23158:
247 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
248 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
249 Use it to set the expedite_regs field in the given tdesc.
250 * x86-tdesc.h: New file.
251 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
252 Adjust following the addition of the new expedite_regs parameter
253 to init_target_desc.
254 * linux-tic6x-low.c (tic6x_read_description): Likewise.
255 * linux-x86-tdesc.c: #include "x86-tdesc.h".
256 (i386_linux_read_description, amd64_linux_read_description):
257 Adjust following the addition of the new expedite_regs parameter
258 to init_target_desc.
259 * lynx-i386-low.c: #include "x86-tdesc.h".
260 (lynx_i386_arch_setup): Adjust following the addition of the new
261 expedite_regs parameter to init_target_desc.
262 * nto-x86-low.c: #include "x86-tdesc.h".
263 (nto_x86_arch_setup): Adjust following the addition of the new
264 expedite_regs parameter to init_target_desc.
265 * win32-i386-low.c: #include "x86-tdesc.h".
266 (i386_arch_setup): Adjust following the addition of the new
267 expedite_regs parameter to init_target_desc.
268
7dbac825
JB
2692018-05-10 Joel Brobecker <brobecker@adacore.com>
270
271 PR server/23158:
272 * win32-low.c (win32_create_inferior): Add call to my_wait
273 setting last_status global.
274
906994d9
JB
2752018-05-10 Joel Brobecker <brobecker@adacore.com>
276
277 PR server/23158:
278 * win32-low.c (create_process): Only call gdb_tilde_expand if
279 inferior_cwd is not NULL.
280
8ee22052
AB
2812018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
282
283 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
284 registers to the cache if their values have changed.
285 (i387_xsave_to_cache): Provide default values for x87 control
286 registers when these features are available, but disabled.
287 * regcache.c (supply_register_by_name_zeroed): New function.
288 * regcache.h (supply_register_by_name_zeroed): Declare new
289 function.
290
aff689d3
TT
2912018-05-07 Tom Tromey <tom@tromey.com>
292
293 * configure: Rebuild.
294
85e26832
TT
2952018-05-04 Tom Tromey <tom@tromey.com>
296
297 * configure: Rebuild.
298
a3b60e45
JK
2992018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
300 Pedro Alves <palves@redhat.com>
301
302 * linux-aarch64-low.c (aarch64_stopped_data_address):
303 Likewise.
304
632e107b
TT
3052018-04-27 Tom Tromey <tom@tromey.com>
306
307 * configure: Rebuild.
308
458412c3
TT
3092018-04-23 Tom Tromey <tom@tromey.com>
310
311 * configure: Rebuild.
312
f31c089e
SM
3132018-04-19 Simon Marchi <simon.marchi@ericsson.com>
314
315 * Makefile.in (depcomp): Add "..".
316 (all_deps_files): New and use it.
317
b319b098
AH
3182018-04-18 Alan Hayward <alan.hayward@arm.com>
319
320 * configure.srv (aarch64*-*-linux*): Don't include xml.
321 (i[34567]86-*-cygwin*): Likewise.
322 (i[34567]86-*-linux*): Likewise.
323 (i[34567]86-*-lynxos*): Likewise.
324 (i[34567]86-*-mingw32ce*): Likewise.
325 (i[34567]86-*-mingw*): Likewise.
326 (i[34567]86-*-nto*): Likewise.
327 (tic6x-*-uclinux): Likewise.
328 (x86_64-*-linux*): Likewise.
329 (x86_64-*-mingw*): Likewise.
330 (x86_64-*-cygwin*): Likewise.
331
3b74854b
AH
3322018-04-18 Alan Hayward <alan.hayward@arm.com>
333
334 * tdesc.c: Remove xml parameter.
335
e98577a9
AH
3362018-04-18 Alan Hayward <alan.hayward@arm.com>
337
338 * server.c (get_features_xml): Remove cast.
339 * tdesc.c (void target_desc::accept): Fill in function.
340 (tdesc_get_features_xml): Remove old xml creation.
341 (print_xml_feature::visit_pre): Add xml vistor.
342 * tdesc.h (struct target_desc): Make xmltarget mutable.
343 (tdesc_get_features_xml): Remove declaration.
344
d278f585
AH
3452018-04-18 Alan Hayward <alan.hayward@arm.com>
346
347 * tdesc.c (tdesc_architecture_name): Add new function.
348 (tdesc_osabi_name): Likewise.
349 (tdesc_get_features_xml): Use new functions.
350
eee8a18d
AH
3512018-04-18 Alan Hayward <alan.hayward@arm.com>
352
353 * tdesc.c (tdesc_create_flags): Remove.
354 (tdesc_add_flag): Likewise.
355 (tdesc_named_type): Likewise.
356 (tdesc_create_union): Likewise.
357 (tdesc_create_struct): Likewise.
358 (tdesc_create_vector): Likewise.
359 (tdesc_add_bitfield): Likewise.
360 (tdesc_add_field): Likewise.
361 (tdesc_set_struct_size): Likewise.
362
82ec9bc7
AH
3632018-04-18 Alan Hayward <alan.hayward@arm.com>
364
365 * tdesc.c (~target_desc): Remove implictly deleted items.
366 (init_target_desc): Iterate all features.
367 (tdesc_get_features_xml): Use vector.
368 (tdesc_create_feature): Create feature.
369 * tdesc.h (tdesc_feature) Remove
370 (target_desc): Add features.
371
ea3e7d71
AH
3722018-04-18 Alan Hayward <alan.hayward@arm.com>
373
374 * Makefile.in: Add common/tdesc.c
375 * tdesc.c (init_target_desc): init all reg_defs from register
376 vector.
377 (tdesc_create_reg): Create tdesc_reg.
378 * tdesc.h (tdesc_feature): Add register vector.
379
17d08cd4
SM
3802018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
381
382 * tdesc.h (struct target_desc) <features>: Change type to
383 std::vector<std::string>.
384 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
385 changes.
386 (tdesc_get_features_xml): Likewise.
387 (tdesc_create_feature): Likewise.
388
5cd3e386
AH
3892018-03-26 Alan Hayward <alan.hayward@arm.com>
390
391 * regcache.c (find_register_by_number): Return a ref.
392 (find_regno): Use references.
393 (register_size): Likewise.
394 (register_data): Likewise.
395 * tdesc.c (target_desc::~target_desc): Remove free calls.
396 (target_desc::operator==): Use std::vector compare.
397 (init_target_desc): Use reference.
398 (tdesc_create_reg): Use reg constructors.
399 * tdesc.h (struct target_desc): Replace pointer with object.
400
dff7492c
AH
4012018-03-23 Alan Hayward <alan.hayward@arm.com>
402
403 * regcache.c (find_register_by_number): Make static.
404 (find_regno): Use find_register_by_number
405 * regcache.h (struct reg): Remove declaration.
406
d80e5242
AH
4072018-03-23 Alan Hayward <alan.hayward@arm.com>
408
409 * tdesc.c (target_desc::~target_desc): Move to here.
410 (target_desc::operator==): Likewise.
411 * tdesc.h (target_desc::~target_desc): Move from here.
412 (target_desc::operator==): Likewise.
413
f69c5afb
AA
4142018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
415
416 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
417
ce29f843
AA
4182018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
419
420 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
421 S390_TDESC_GS.
422 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
423 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
424 and init_registers_s390_gs_linux64.
425
c49bd90b
AA
4262018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
427
428 * linux-s390-low.c (s390_fill_gs): Remove function.
429 (s390_fill_gsbc): Remove function.
430 (s390_regsets): Set fill functions for the guarded storage regsets
431 to NULL.
432
7edb9bd3
AA
4332018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
434
435 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
436 the word size. Add comment.
437 (s390_get_wordsize): New function.
438 (s390_arch_setup): No longer select a temporary tdesc to fetch the
439 pswm with it. Instead, use s390_get_wordsize to determine the
440 word size first and derive the correct tdesc from that directly.
441
39be3c7e
SM
4422018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
443
444 * Makefile.in: Include silent-rules.mk.
445 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
446 (COMPILE): Add ECHO_CXX.
447 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
448 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
449 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
450 (version-generated.c): Add ECHO_GEN.
451 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
452 (IPAGENT_COMPILE): Add ECHO_CXX.
453 (%-generated.c): Add ECHO_REGDAT.
454
3ae9ce5d
TT
4552018-03-14 Tom Tromey <tom@tromey.com>
456
457 PR cli/14977:
458 * ax.c (ax_printf): Special case for NULL.
459
e6a58aa8
SM
4602018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
461
462 * linux-low.c (linux_qxfer_libraries_svr4): Use
463 xml_escape_text_append.
464
f6e8a41e
SM
4652018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
466
467 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
468
b9671caf
SM
4692018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
470
471 * server.c (handle_general_set): Remove unnecessary xstrdup.
472
e80aaf61
SM
4732018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
474
475 * server.c (parse_debug_format_options): Adjust to
476 delim_string_to_char_ptr_vec changes.
477 * thread-db.c (thread_db_load_search): Adjust to
478 dirnames_to_char_ptr_vec changes.
479
b1223e78
MM
4802018-03-01 Markus Metzger <markus.t.metzger@intel.com>
481
482 * target.h (target_enable_btrace, target_disable_btrace)
483 (target_read_btrace, target_read_btrace_conf): Turn macro into
484 inline function. Throw error if target method is not defined.
485 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
486 check for btrace target method. Be prepared to handle exceptions
487 from btrace target methods.
488
81561546
SDJ
4892018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
490
491 * server.c (captured_main): Change order of error message printed
492 when the current working directory cannot be found.
493
25e3c82c
SDJ
4942018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
495
496 * server.c: Include "filenames.h" and "pathstuff.h".
497 (program_name): Delete variable.
498 (program_path): New anonymous class.
499 (get_exec_wrapper): Use "program_path" instead of
500 "program_name".
501 (handle_v_run): Likewise.
502 (captured_main): Likewise.
503 (process_serial_event): Likewise.
504
b4987c95
SDJ
5052018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
506
507 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
508 (OBJS): Add "pathstuff.o".
509 * server.c (current_directory): New global variable.
510 (captured_main): Initialize "current_directory".
511
f46cd62a
AH
5122018-02-26 Alan Hayward <alan.hayward@arm.com>
513
514 * tdesc.c: Use common/tdesc.h.
515 * tdesc.h: Likewise.
516
a543c5ca
AH
5172018-02-20 Alan Hayward <alan.hayward@arm.com>
518 Simon Marchi <simon.marchi@ericsson.com>
519
520 * Makefile.in: Switch order of make rules.
521
b5884fa7
AH
5222018-02-19 Alan Hayward <alan.hayward@arm.com>
523
524 * Makefile.in: Add common directory in build.
525 * configure.ac: Add common reference.
526 * configure: Regenerate.
527
de6242d3
MM
5282018-02-09 Markus Metzger <markus.t.metzger@intel.com>
529
530 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
531 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
532 * spu-low.c (spu_target_ops): Likewise.
533 * win32-low.c (win32_target_ops): Likewise.
534 * server.c (supported_btrace_packets): Report packets unconditionally.
535 * target.h (target_ops) <supports_btrace>: Remove.
536 (target_supports_btrace): Remove.
537
9ee23a85
MM
5382018-02-09 Markus Metzger <markus.t.metzger@intel.com>
539
540 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
541 (handle_btrace_disable): Change return type to void. Use exceptions
542 to report errors.
543 (handle_btrace_general_set): Catch exception and copy message to
544 return message.
545
8ce47547
TT
5462018-02-08 Tom Tromey <tom@tromey.com>
547
548 * linux-low.c (install_software_single_step_breakpoints): Use
549 make_scoped_restore.
550 * inferiors.c (make_cleanup_restore_current_thread): Remove.
551 (do_restore_current_thread_cleanup): Remove.
552 * gdbthread.h (make_cleanup_restore_current_thread): Don't
553 declare.
554
45dd3607
TT
5552018-02-08 Tom Tromey <tom@tromey.com>
556
557 * mem-break.c (set_raw_breakpoint_at): Use
558 gdb::unique_xmalloc_ptr.
559
e671cd59
PA
5602018-01-30 Pedro Alves <palves@redhat.com>
561
562 PR gdb/13211
563 * target.c (target_terminal::terminal_state): Rename to ...
564 (target_terminal::m_terminal_state): ... this.
565
a0aad537
JC
5662018-01-19 James Clarke <jrtc27@jrtc27.com>
567
568 * linux-low.c (handle_extended_wait): Surround call to
569 thread_db_notice_clone with #ifdef USE_THREAD_DB.
570
4d9b86e1
SM
5712018-01-17 Simon Marchi <simon.marchi@ericsson.com>
572
573 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
574 linux_ptrace_attach_fail_reason_string now returning an
575 std::string.
576 (linux_attach): Likewise.
577 * thread-db.c (attach_thread): Likewise.
578
f517c180
EA
5792018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
580
581 PR gdb/21559
582 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
583 checking for fs_base/gs_base fields in struct user_regs_struct.
584 * configure: Regenerate.
585
9a70f35c
YQ
5862018-01-16 Yao Qi <yao.qi@linaro.org>
587
588 PR gdb/18749
589 * linux-low.c (fetch_register): Call supply_register instead of
590 error.
591
605fd3c6
YQ
5922018-01-08 Yao Qi <yao.qi@linaro.org>
593 Simon Marchi <simon.marchi@ericsson.com>
594
595 * Makefile.in (OBS): Remove selftest.o.
596 * configure.ac: Set srv_selftest_objs if $development is true.
597 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
598 * configure: Re-generated.
599 * server.c (captured_main): Wrap variable selftest_filter with
600 GDB_SELF_TEST.
601
2cc05030
SM
6022018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
603
604 * server.c (parse_debug_format_options): Return std::string.
605 (handle_monitor_command, captured_main): Adjust.
606
e379cee6
PA
6072018-01-05 Pedro Alves <palves@redhat.com>
608
609 PR gdb/18653
610 * server.c (captured_main): Pass quiet=false to
611 save_original_signals_state.
612
82e1e79a
JB
6132018-01-01 Joel Brobecker <brobecker@adacore.com>
614
615 * gdbreplay.c (gdbreplay_version): Update copyright year in
616 version message.
617 * server.c (gdbserver_version): Likewise.
618
8e481c3b
TT
6192017-12-08 Tom Tromey <tom@tromey.com>
620
621 * ax.c (ax_printf): Update.
622
a8806230
YQ
6232017-12-07 Yao Qi <yao.qi@linaro.org>
624
625 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
626 aarch64_linux_read_description.
627 * linux-amd64-ipa.c (idx2mask): New array.
628 (get_ipa_tdesc): Move idx2mask out.
629 (initialize_low_tracepoint): Initialize target descriptions.
630 * linux-i386-ipa.c (idx2mask): New array.
631 (get_ipa_tdesc): Move idx2mask out.
632 (initialize_low_tracepoint): Initialize target descriptions.
633
d4a0e8b5
SM
6342017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
635
636 * tdesc.c (struct tdesc_type): Change return type.
637 (tdesc_add_flag): Change parameter type.
638 (tdesc_add_bitfield): Likewise.
639 (tdesc_add_field): Likewise.
640 (tdesc_set_struct_size): Likewise.
641
798a7429
SM
6422017-12-05 Simon Marchi <simon.marchi@ericsson.com>
643
644 * regcache.c (registers_to_string): Remove unused variable.
645
c0e15c9b
SM
6462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
647
648 * inferiors.c (for_each_inferior_with_data): Remove.
649 * inferiors.h (for_each_inferior_with_data): Remove.
650 * server.c (handle_qxfer_threads_worker): Change parameter type.
651 (handle_qxfer_threads_proper): Use for_each_thread.
652
f0045347
SM
6532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * inferiors.c (for_each_inferior): Remove.
656 (clear_inferiors): Use for_each_thread.
657 * inferiors.h (for_each_inferior): Remove.
658 * linux-low.c (linux_wait_for_event_filtered): Use
659 for_each_thread.
660 (linux_stabilize_threads): Likewise.
661 * regcache.c (regcache_release): Likewise.
662 * server.c (gdb_wants_all_threads_stopped): Likewise.
663 (clear_pending_status_callback): Remove.
664 (handle_status): Use for_each_thread.
665 (captured_main): Likewise.
666 * win32-low.c (child_init_thread_list): Likewise.
667 (win32_clear_inferiors): Likewise.
668 (fake_breakpoint_event): Likewise.
669
9521758b
SM
6702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
671
672 * inferiors.h (find_inferior): Remove.
673 * inferiors.c (find_inferior): Remove.
674
8f86d7aa
SM
6752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
676
677 * linux-low.c (resume_status_pending_p): Update comment.
678 (need_step_over_p): Update comment.
679
e2b44075
SM
6802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
681
682 * linux-low.c (proceed_one_lwp): Return void, change parameter
683 type.
684 (unsuspend_and_proceed_one_lwp): Likewise.
685 (proceed_all_lwps): Use for_each_thread.
686 (unstop_all_lwps): Likewise.
687
c80825ff
SM
6882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
689
690 * linux-low.c (linux_resume_one_thread): Return void, take
691 parameter directly.
692 (linux_resume): Use for_each_thread.
693
df3e4dbe
SM
6942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
695
696 * linux-low.c (send_sigstop_callback): Return void, change
697 parameter type. Rename to...
698 (send_sigstop): ... this.
699 (suspend_and_send_sigstop_callback): Return void, change parameter
700 type. Rename to...
701 (suspend_and_send_sigstop): ... this.
702 (stop_all_lwps): Use for_each_thread.
703
5a6b0a41
SM
7042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
705
706 * linux-low.c (lwp_running): Return bool, remove unused
707 argument.
708 (linux_stabilize_threads): Use find_thread.
709
39a64da5
SM
7102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
711
712 * linux-low.c (select_singlestep_lwp_callback): Remove.
713 (count_events_callback): Remove.
714 (select_event_lwp_callback): Remove.
715 (select_event_lwp): Use find_thread/for_each_thread.
716
a1385b7b
SM
7172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
718
719 * linux-low.c (not_stopped_callback): Return bool, take filter
720 argument directly.
721 (linux_wait_for_event_filtered): Use find_thread.
722 (linux_wait_1): Likewise.
723
454296a2
SM
7242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
725
726 * linux-low.c (same_lwp): Remove.
727 (find_lwp_pid): Use find_thread.
728
6b2a85da
SM
7292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
730
731 * linux-low.c (delete_lwp_callback): Remove.
732 (linux_mourn): Use for_each_thread.
733
798a38e8
SM
7342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
735
736 * linux-low.c (linux_detach_lwp_callback): Return void, remove
737 args parameter, don't check for pid.
738 (linux_detach): Use for_each_thread.
739
e4eb0dec
SM
7402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
741
742 * linux-low.c (struct counter): Remove.
743 (second_thread_of_pid_p): Remove.
744 (last_thread_of_process_p): Use find_thread.
745
83e1b6c1
SM
7462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
747
748 * inferiors.c (find_inferior_in_random): Remove.
749 * inferiors.h (find_inferior_in_random): Remove.
750 * linux-low.c (status_pending_p_callback): Return bool, accept
751 parameter ptid directly.
752 (linux_wait_for_event_filtered): Use find_thread_in_random.
753 (linux_wait_1): Likewise.
754
8dc7b443
SM
7552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
756
757 * inferiors.c (find_inferior_id): Remove.
758 (find_thread_ptid): Move implemention from find_inferior_id to
759 here.
760 * inferiors.h (find_inferior_id): Remove.
761 * server.c (handle_status): Use find_thread_ptid.
762 (process_serial_event): Likewise.
763 * thread-db.c (find_one_thread): Likewise.
764 (thread_db_thread_handle): Likewise.
765 * win32-low.c (thread_rec): Likewise.
766 (child_delete_thread): Likewise.
767 (win32_thread_alive): Likewise.
768 (get_child_debug_event): Likewise.
769
da25033c
SM
7702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * linux-mips-low.c (update_watch_registers_callback): Return
773 void, remove pid_p parameter, don't check for pid.
774 (mips_insert_point, mips_remove_point): Use for_each_thread.
775
c91bb56b
SM
7762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
777
778 * lynx.low (lynx_delete_thread_callback): Remove.
779 (lynx_mourn): Use for_each_thread.
780
634a3254
SM
7812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
782
783 * regcache.c (regcache_invalidate_one): Remove.
784 (regcache_invalidate_pid): use for_each_thread.
785
41272101
TT
7862017-11-26 Tom Tromey <tom@tromey.com>
787
788 * linux-low.c (linux_create_inferior): Update.
789
f5291a6f
UW
7902017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
791
792 * spu-low.c (spu_create_inferior): Fix typo in argument name.
793
6654d750
AH
7942017-11-24 Alan Hayward <alan.hayward@arm.com>
795
796 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
797 * linux-aarch64-low.c (initialize_low_arch): Call init func.
798 * linux-aarch64-tdesc-selftest.c: New file.
799 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
800
8012017-11-24 Alan Hayward <alan.hayward@arm.com>
802
803 * configure.srv: Add new file.
804 * linux-aarch64-low.c (initialize_low_arch): Call init func.
805 * linux-aarch64-tdesc-selftest.c: New file.
806 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
807
49bdb7ee
AH
8082017-11-24 Alan Hayward <alan.hayward@arm.com>
809
810 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
811 * linux-aarch64-low.c (initialize_low_arch): Remove init.
812 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
813
d6d7ce56
AH
8142017-11-24 Alan Hayward <alan.hayward@arm.com>
815
816 * configure.srv: Add new files.
817 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
818 aarch64_linux_read_description.
819 * linux-aarch64-low.c (aarch64_linux_read_description):
820 Merge with aarch64_arch_setup.
821 (aarch64_arch_setup): Call aarch64_linux_read_description.
822 * linux-aarch64-tdesc.c: New file.
823 * linux-aarch64-tdesc.h: New file.
824
506fe5f4
YQ
8252017-11-24 Yao Qi <yao.qi@linaro.org>
826
827 * configure.srv: Set $srv_regobj for tic6x-linux.
828 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
829 (tic6x_read_description): Move some code to tic6x_arch_setup.
830 (tic6x_tdesc_test): New function.
831 (initialize_low_arch): Call selftests::register_test.
832
29f9a567
YQ
8332017-11-22 Yao Qi <yao.qi@linaro.org>
834
835 * remote-utils.c (prepare_resume_reply): Use memcpy.
836
578290ec
SM
8372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
838
839 * linux-low.c (kill_one_lwp_callback): Return void, take
840 argument directly, don't filter on pid.
841 (linux_kill): Use for_each_thread.
842
eca55aec
SM
8432017-11-19 Simon Marchi <simon.marchi@ericsson.com>
844
845 * linux-low.c (need_step_over_p): Return bool, remove dummy
846 argument.
847 (linux_resume, proceed_all_lwps): Use find_thread.
848
25c28b4d
SM
8492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
850
851 * linux-low.c (resume_status_pending_p): Return bool, remove
852 flag_p argument.
853 (linux_resume): Use find_thread.
854
5fdda392
SM
8552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
856
857 * linux-low.c (struct thread_resume_array): Remove.
858 (linux_set_resume_request): Return void, take arguments
859 directly.
860 (linux_resume): Use for_each_thread.
861
fcb056a5
SM
8622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
863
864 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
865 return bool, remove data argument.
866 (linux_stabilize_threads): Use find_thread.
867
139720c5
SM
8682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
869
870 * linux-low.c (unsuspend_one_lwp): Remove.
871 (unsuspend_all_lwps): Use for_each_thread, inline code from
872 unsuspend_one_lwp.
873
6d1e5673
SM
8742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
875
876 * gdbthread.h (find_thread): Add overload with ptid_t filter.
877 * linux-low.c (struct iterate_over_lwps_args): Remove.
878 (iterate_over_lwps_filter): Remove.
879 (iterate_over_lwps): Use find_thread.
880
bbf550d5
SM
8812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
882
883 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
884 (linux_handle_new_gdb_connection): Use for_each_thread, inline
885 code from reset_lwp_ptrace_options_callback.
886
00192f77
SM
8872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
888
889 * linux-arm-low.c (struct update_registers_data): Remove.
890 (update_registers_callback): Return void, take arguments
891 directly, don't check thread's pid.
892 (arm_insert_point, arm_remove_point): Use for_each_thread.
893
2bee2b6c
SM
8942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
895
896 * win32-low.c (continue_one_thread): Return void, take argument
897 directly.
898 (child_continue): Use for_each_thread.
899
0b360f19
SM
9002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
901
902 * win32-i386-low.c (update_debug_registers_callback): Rename
903 to ...
904 (update_debug_registers): ... this, return void, remove pid_p arg.
905 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
906
f27866ba
SM
9072017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
908
909 * inferiors.h (struct process_info): Add constructor, initialize
910 fields..
911 <syscalls_to_catch>: Change type to std::vector<int>.
912 * inferiors.c (add_process): Allocate process_info with new.
913 (remove_process): Free process_info with delete.
914 * linux-low.c (handle_extended_wait): Adjust.
915 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
916 * server.c (handle_general_set): Adjust.
917
e849ea89
PA
9182017-11-16 Pedro Alves <palves@redhat.com>
919
920 * remote-utils.c (remote_close): Block SIGIO signals instead of
921 uninstalling the SIGIO handler.
922
1d0aa65c
AH
9232017-11-16 Alan Hayward <alan.hayward@arm.com>
924
925 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
926
3491a34c
YQ
9272017-11-16 Yao Qi <yao.qi@linaro.org>
928
929 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
930 (tic6x_store_gregset): Likewise.
931 (tic6x_usrregs_info): Move it up.
932
a602f924
AH
9332017-11-15 Alan Hayward <alan.hayward@arm.com>
934
935 * Makefile.in: Update arch rules.
936 * configure.srv: Explicitly mark arch/ files.
937
5616b6c3
AS
9382017-11-13 Andreas Schwab <schwab@suse.de>
939
940 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
941 function.
942 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
943
d1928160
PA
9442017-11-06 Pedro Alves <palves@redhat.com>
945
946 * config.in, configure: Regenerate.
947
bac608e7
SM
9482017-10-27 Simon Marchi <simon.marchi@ericsson.com>
949
950 * target.c (struct thread_search): Remove.
951 (thread_search_callback): Remove.
952 (prepare_to_access_memory): Use for_each_thread instead of
953 find_inferior. Inline code from thread_search_callback.
954
eaddb425
SM
9552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
956
957 * server.c (struct visit_actioned_threads_data): Remove.
958 (visit_actioned_threads): Change prototype to take arguments
959 directly.
960 (resume): Use find_thread instead of find_inferior.
961
99078d34
SM
9622017-10-27 Simon Marchi <simon.marchi@ericsson.com>
963
964 * server.c (queue_stop_reply_callback): Change prototype, return
965 void.
966 (find_status_pending_thread_callback): Remove.
967 (handle_status): Replace find_inferior with find_thread and
968 for_each_thread.
969
cc628f3d
AH
9702017-10-25 Alan Hayward <alan.hayward@arm.com>
971
972 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
973 with REGNO.
974 (aarch64_store_gregset): Likewise.
975 (aarch64_fill_fpregset): Likewise.
976 (aarch64_store_fpregset): Likewise.
977
4d3bb80e
SM
9782017-10-21 Simon Marchi <simon.marchi@ericsson.com>
979
980 * gdbthread.h (find_thread, for_each_thread): New functions.
981 * inferiors.c (thread_of_pid): Remove.
982 (find_any_thread_of_pid): Use find_thread.
983 * linux-low.c (num_lwps): Use for_each_thread.
984
7a7cdfa0
YQ
9852017-10-17 Yao Qi <yao.qi@linaro.org>
986
987 * Makefile.in: Remove one rule.
988 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
989
e675d170
YQ
9902017-10-17 Yao Qi <yao.qi@linaro.org>
991
992 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
993 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
994
7eb4e0f9
YQ
9952017-10-17 Yao Qi <yao.qi@linaro.org>
996
997 * configure.srv: Rename arm.o with arch/arm.o.
998
60d6cfc9
YQ
9992017-10-17 Yao Qi <yao.qi@linaro.org>
1000
1001 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1002 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1003 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1004 (arch-i386.o, arch-amd64.o): Remove rules.
1005 (arch/%.o): New rule.
1006 Update POSTCOMPILE and COMPILE.pre.
1007 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1008 * configure: Re-generated.
1009 * configure.srv: Replace arch-i386.o with arch/i386.o.
1010 Replace arch-amd64.o with arch/amd64.o.
1011
5bfda255
YQ
10122017-10-16 Yao Qi <yao.qi@linaro.org>
1013
1014 * configure: Regenerated.
1015
9c80ecd6
SM
10162017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1017
1018 * inferiors.h: (struct inferior_list): Remove.
1019 (struct inferior_list_entry); Remove.
1020 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1021 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1022 get_first_inferior): Remove.
1023 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1024 find_inferior_id, find_inferior_in_random): Change signature.
1025 * inferiors.c (all_threads): Change type to
1026 std::list<thread_info *>.
1027 (get_thread): Remove macro.
1028 (find_inferior, find_inferior_id): Change signature, implement
1029 using find_thread.
1030 (find_inferior_in_random): Change signature, implement using
1031 find_thread_in_random.
1032 (for_each_inferior, for_each_inferior_with_data): Change
1033 signature, implement using for_each_thread.
1034 (add_inferior_to_list, remove_inferior): Remove.
1035 (add_thread, get_first_thread, thread_of_pid,
1036 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1037 (get_first_inferior, one_inferior_p, clear_inferior_list):
1038 Remove.
1039 (clear_inferiors, get_thread_process): Update.
1040 * gdbthread.h: Include <list>.
1041 (struct thread_info) <entry>: Remove field.
1042 <id>: New field.
1043 (all_threads): Change type to std::list<thread_info *>.
1044 (get_first_inferior): Add doc.
1045 (find_thread, for_each_thread, find_thread_in_random): New
1046 functions.
1047 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1048 * linux-arm-low.c (update_registers_callback): Update.
1049 * linux-low.c (second_thread_of_pid_p): Update.
1050 (kill_one_lwp_callback, linux_detach_lwp_callback,
1051 delete_lwp_callback, status_pending_p_callback, same_lwp,
1052 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1053 iterate_over_lwps, not_stopped_callback,
1054 resume_stopped_resumed_lwps, count_events_callback,
1055 select_singlestep_lwp_callback, select_event_lwp_callback,
1056 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1057 suspend_and_send_sigstop_callback, wait_for_sigstop,
1058 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1059 lwp_running, linux_set_resume_request, resume_status_pending_p,
1060 need_step_over_p, start_step_over, linux_resume_one_thread,
1061 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1062 reset_lwp_ptrace_options_callback): Update.
1063 * linux-mips-low.c (update_watch_registers_callback): Update.
1064 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1065 Update.
1066 (free_register_cache_thread_one): Remove.
1067 (regcache_release): Update.
1068 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1069 handle_qxfer_threads_worker): Update.
1070 (handle_query): Update, use list iterator.
1071 (visit_actioned_threads, handle_pending_status,
1072 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1073 clear_pending_status_callback, set_pending_status_callback,
1074 find_status_pending_thread_callback, handle_status,
1075 process_serial_event): Update.
1076 * target.c (thread_search_callback): Update.
1077 * thread-db.c (thread_db_get_tls_address): Update.
1078 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1079 Update.
1080 * win32-i386-low.c (update_debug_registers_callback): Update.
1081 * win32-low.c (delete_thread_info, child_delete_thread,
1082 continue_one_thread, suspend_one_thread,
1083 get_child_debug_event): Adjust.
1084
9179355e
SM
10852017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1088 * inferiors.h: Include <list>.
1089 (struct process_info) <entry>: Remove field.
1090 <pid>: New field.
1091 (pid_of): Change macro to function.
1092 (ptid_of, lwpid_of): Remove macro.
1093 (all_processes): Change type to std::list<process_info *>.
1094 (ALL_PROCESSES): Remove macro.
1095 (for_each_process, find_process): New function.
1096 * inferiors.c (all_processes): Change type to
1097 std::list<process_info *>.
1098 (find_thread_process): Adjust.
1099 (add_process): Likewise.
1100 (remove_process): Likewise.
1101 (find_process_pid): Likewise.
1102 (get_first_process): Likewise.
1103 (started_inferior_callback): Remove.
1104 (have_started_inferiors_p): Adjust.
1105 (attached_inferior_callback): Remove.
1106 (have_attached_inferiors_p): Adjust.
1107 * linux-low.c (check_zombie_leaders): Likewise.
1108 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1109 (x86_linux_update_xmltarget): Adjust.
1110 * server.c (handle_query): Likewise.
1111 (gdb_reattached_process): Remove.
1112 (handle_status): Adjust.
1113 (kill_inferior_callback): Likewise.
1114 (detach_or_kill_inferior): Remove.
1115 (print_started_pid): Likewise.
1116 (print_attached_pid): Likewise.
1117 (detach_or_kill_for_exit): Update.
1118 (process_serial_event): Likewise.
1119 * linux-arm-low.c (arm_new_fork): Likewise.
1120
c9cb8905
SM
11212017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1122
1123 * dll.h: Include <list>.
1124 (struct dll_info): Add constructor.
1125 <entry>: Remove field.
1126 (all_dlls): Change type to std::list<dll_info>.
1127 * dll.c: Include <algorithm>.
1128 (get_dll): Remove macro.
1129 (all_dlls): Change type to std::list<dll_info *>.
1130 (free_one_dll): Remove.
1131 (match_dll): Likewise.
1132 (loaded_dll): Adjust.
1133 (unloaded_dll): Adjust to all_dlls type change, use
1134 std::find_if. Inline code from match_dll.
1135 (clear_dlls): Adjust to all_dlls type change.
1136 * server.c (emit_dll_description): Remove.
1137 (handle_qxfer_libraries): Adjust to all_dlls type change,
1138 integrate emit_dll_description's functionality.
1139
04ec7890
SM
11402017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1141
1142 * linux-low.h (struct linux_target_ops) <delete_process>: New
1143 field.
1144 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1145 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1146 (struct linux_target_ops): Add delete_process callback.
1147 * linux-arm-low.c (arm_delete_process): New.
1148 (struct linux_target_ops): Add delete_process callback.
1149 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1150 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1151 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1152 * linux-mips-low.c (mips_linux_delete_process): New.
1153 (struct linux_target_ops): Add delete_process callback.
1154 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1155 * linux-s390-low.c (struct linux_target_ops): Likewise.
1156 * linux-sh-low.c (struct linux_target_ops): Likewise.
1157 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1158 * linux-tile-low.c (struct linux_target_ops): Likewise.
1159 * linux-x86-low.c (x86_linux_delete_process): New.
1160 (struct linux_target_ops): Add delete_process callback.
1161 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1162
466eecee
SM
11632017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1164
1165 * linux-aarch64-low.c (the_low_target): Add thread delete
1166 callback.
1167 * linux-arm-low.c (arm_delete_thread): New function.
1168 (the_low_target): Add thread delete callback.
1169 * linux-bfin-low.c (the_low_target): Likewise.
1170 * linux-crisv32-low.c (the_low_target): Likewise.
1171 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1172 set.
1173 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1174 field.
1175 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1176 * linux-mips-low.c (mips_linux_delete_thread): New function.
1177 (the_low_target): Add thread delete callback.
1178 * linux-ppc-low.c (the_low_target): Likewise.
1179 * linux-s390-low.c (the_low_target): Likewise.
1180 * linux-sh-low.c (the_low_target): Likewise.
1181 * linux-tic6x-low.c (the_low_target): Likewise.
1182 * linux-tile-low.c (the_low_target): Likewise.
1183 * linux-x86-low.c (the_low_target): Likewise.
1184 * linux-xtensa-low.c (the_low_target): Likewise.
1185
b79f7801
YZ
11862017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1187
1188 * win32-low.c: Include "common-inferior.h".
1189
bc3b087d
SDJ
11902017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1191
1192 * inferiors.c (set_inferior_cwd): New function.
1193 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1194 (handle_query): Inform that QSetWorkingDir is supported.
1195 * win32-low.c (create_process): Pass the inferior's cwd to
1196 CreateProcess.
1197
d092c5a2
SDJ
11982017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1199
1200 * inferiors.c (current_inferior_cwd): New global variable.
1201 (get_inferior_cwd): New function.
1202 * inferiors.h (struct process_info) <cwd>: New field.
1203
7da0a886
SDJ
12042017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1205
1206 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1207 (OBS): Add gdb_tilde_expand.o.
1208
289a6840
SM
12092017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1212 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1213
256642e8
PA
12142017-09-29 Pedro Alves <palves@redhat.com>
1215
1216 * ax.c (gdb_parse_agent_expr): Constify.
1217 * ax.h (gdb_parse_agent_expr): Constify.
1218 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1219 Constify.
1220 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1221 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1222 * remote-utils.h (read_ptid): Constify.
1223 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1224 (process_point_options, process_serial_event): Constify.
1225 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1226 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1227 (cmd_qtbuffer): Constify.
1228
5b9ca4d4
PA
12292017-09-29 Pedro Alves <palves@redhat.com>
1230
1231 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1232 fails.
1233
94c207e0
PA
12342017-09-29 Pedro Alves <palves@redhat.com>
1235
1236 * linux-low.c (handle_extended_wait): Pass parent thread instead
1237 of process to thread_db_notice_clone.
1238 * linux-low.h (thread_db_notice_clone): Replace parent process
1239 parameter with parent thread parameter.
1240 * thread-db.c (find_one_thread): Add comment.
1241 (thread_db_notice_clone): Replace parent process parameter with
1242 parent thread parameter. Temporarily switch to the parent thread.
1243
75352e28
SDJ
12442017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1245
1246 * gdbthread.h: Include "common-gdbthread.h".
1247 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1248 "if" when validating the ptid.
1249 * remote-utils.c: Include "gdbthread.h".
1250 (prepare_resume_reply): Use "switch_to_thread".
1251 * target.c (done_accessing_memory): Likewise.
1252
ad339634
AA
12532017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1254
1255 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1256 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1257 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1258 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1259 s390x-gs-linux64-ipa.o to ipa_obj.
1260 * linux-s390-low.c (HWCAP_S390_GS): New define.
1261 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1262 New functions.
1263 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1264 (s390_arch_setup): Check for guarded-storage support and choose
1265 appropriate tdesc.
1266 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1267 init_registers_s390x_gs_linux64.
1268 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1269 enum value.
1270 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1271 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1272
cc4d742f
SM
12732017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1274
1275 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1276
f6327dcb
KB
12772017-09-21 Kevin Buettner <kevinb@redhat.com>
1278
1279 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1280 (thread_db_thread_handle): Declare.
1281 * linux-low.c (linux_target_ops): Initialize thread_handle.
1282 * server.c (handle_qxfer_threads_worker): Add support for
1283 "handle" attribute.
1284 * target.h (struct target_ops): Add new function pointer,
1285 thread_handle.
1286 (target_thread_handle): Define.
1287 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1288 field in lwp.
1289 (thread_db_thread_handle): New function.
1290
86299109
KB
12912017-09-21 Kevin Buettner <kevinb@redhat.com>
1292
1293 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1294 * linux-low.h (thread_db_notice_clone): Declare.
1295 * thread-db.c (thread_db_notice_clone): New function.
1296
f557a88a
PA
12972017-09-21 Pedro Alves <palves@redhat.com>
1298
1299 * server.c (gdb_read_memory, handle_status, process_serial_event)
1300 (handle_serial_event, handle_target_event): Adjust to
1301 set_desired_thread prototype change.
1302 * target.c (set_desired_thread): Remove 'use_general' parameter
1303 and adjust.
1304 * target.h (set_desired_thread): Remove 'use_general' parameter.
1305
223ffa71
TT
13062017-09-20 Tom Tromey <tom@tromey.com>
1307
1308 * target.c (target_terminal::terminal_state): Define.
1309 (target_terminal::init): Rename from target_terminal_init.
1310 (target_terminal::inferior): Rename from
1311 target_terminal_inferior.
1312 (target_terminal::ours): Rename from target_terminal_ours.
1313 (target_terminal::ours_for_output, target_terminal::info): New.
1314
04fd3ba9
SM
13152017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1316
1317 * server.c (accumulate_file_name_length): Remove.
1318 (emit_dll_description): Adjust to std::string change.
1319 (handle_qxfer_libraries): Use std::string to hold document.
1320
5e187554
SM
13212017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1324 return type of xml_escape_text.
1325 * server.c (emit_dll_description): Likewise.
1326
1526853e
SM
13272017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1328
1329 * server.c (captured_main): Accept argument for --selftest.
1330 Update run_tests call.
1331 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1332 when registering selftests.
1333
c4dfafab
SDJ
13342017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1335
1336 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1337 instead of "VEC" for "target_desc.reg_defs".
1338 (regcache_cpy): Likewise.
1339 (registers_to_string): Likewise.
1340 (registers_from_string): Likewise.
1341 (find_regno): Likewise.
1342 (supply_regblock): Likewise.
1343 (regcache_raw_read_unsigned): Likewise.
1344 * tdesc.c (init_target_desc): Likewise.
1345 (tdesc_create_reg): Likewise.
1346 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1347 (struct target_desc) <reg_defs>: Convert to "std::vector".
1348 (target_desc): Do not initialize "reg_defs".
1349 (~target_desc): Update code to use "std::vector" instead of "VEC"
1350 for "target_desc.reg_defs".
1351 (operator==): Likewise.
1352
124aceb4
SM
13532017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * inferiors.h (thread_to_gdb_id): Remove.
1356 * inferiors.c (thread_to_gdb_id): Remove.
1357 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1358 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1359 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1360 Likewise.
1361 * nto-low.c (nto_fetch_registers, nto_store_registers,
1362 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1363
96cde54f
SM
13642017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1365
1366 * inferiors.h (gdb_id_to_thread_id): Remove.
1367 * inferiors.c (gdb_id_to_thread_id): Remove.
1368 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1369 removal. Move pid declaration closer to where it's used.
1370
e8ca139e
SM
13712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1372
1373 * server.c (handle_detach): New function.
1374 (process_serial_event): Move code out, call handle_detach.
1375
f8a4e119
SM
13762017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1377
1378 * server.c (require_running): Rename to ...
1379 (require_running_or_return): ... this ...
1380 (require_running_or_break): ... and this.
1381 (handle_query, process_serial_event): Adjust.
1382
0eb0a407
SM
13832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1384
1385 * linux-low.c (linux_set_resume_request): Remove unused
1386 variables.
1387
785922a5
SM
13882017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1389
1390 * server.c (first_thread_of): Remove.
1391 (process_serial_event): Replace usage of first_thread_of with
1392 find_any_thread_of_pid.
1393 * tracepoint.c (same_process_p): Remove.
1394 (gdb_agent_about_to_close): Replace usage of same_process_p with
1395 find_any_thread_of_pid.
1396 * linux-x86-low.c (same_process_callback): Remove.
1397 (x86_arch_setup_process_callback): Replace usage of
1398 same_process_callback with find_any_thread_of_pid.
1399 * thread-db.c (any_thread_of): Remove.
1400 (switch_to_process): Replace usage of any_thread_of with
1401 find_any_thread_of_pid.
1402 * inferiors.c (thread_pid_matches_callback): Remove.
1403 (find_thread_process): Adjust to use find_any_thread_of_pid.
1404
a059f00c
SDJ
14052017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1406
1407 * regcache.c (get_thread_regcache): Guard calls to "memset"
1408 with "!VEC_empty".
1409
cc397f3a
SDJ
14102017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1411
1412 * linux-low.c (handle_extended_wait): Use
1413 "allocate_target_description" instead of "XNEW".
1414 * linux-x86-low.c (initialize_low_arch): Likewise.
1415
22916b07
YQ
14162017-09-05 Yao Qi <yao.qi@linaro.org>
1417
1418 * configure.srv (srv_i386_regobj): Remove.
1419 (srv_amd64_regobj): Remove.
1420 (srv_regobj): Set it to "" for x86 non-linux targets.
1421 * linux-x86-tdesc.c (i386_linux_read_description):
1422 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1423 (init_registers_i386): Remove the declaration.
1424 (tdesc_i386): Remove the declaration.
1425 (lynx_i386_arch_setup): Call i386_create_target_description.
1426 * nto-x86-low.c: Likewise.
1427 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1428 [!__x86_64__]: include arch/i386.h.
1429 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1430
38602d55
YQ
14312017-09-05 Yao Qi <yao.qi@linaro.org>
1432
1433 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1434 i386/amd64-XXX-linux from it.
1435
44b886ff
YQ
14362017-09-05 Yao Qi <yao.qi@linaro.org>
1437
1438 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1439 false.
1440 (ipa_amd64_linux_regobj): Remove.
1441 (ipa_x32_linux_regobj): Remove.
1442
b4570e4b
YQ
14432017-09-05 Yao Qi <yao.qi@linaro.org>
1444
1445 * Makefile.in (arch-amd64.o): New rule.
1446 * configure.srv: Append arch-amd64.o.
1447 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1448 (get_ipa_tdesc): Call amd64_linux_read_description.
1449 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1450 and init_registers_amd64_XXX.
1451 * linux-x86-low.c (x86_linux_read_description): Call
1452 amd64_linux_read_description.
1453 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1454 (initialize_low_arch): Don't call init_registers_x32_XXX and
1455 init_registers_amd64_XXX.
1456 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1457 and tdesc_amd64_XXX.
1458 [__x86_64__] (amd64_tdesc_test): New function.
1459 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1460 and init_registers_amd64_XXX.
1461 * linux-x86-tdesc.c: Include arch/amd64.h.
1462 (xcr0_to_tdesc_idx): New function.
1463 (i386_linux_read_description): New function.
1464 (amd64_get_ipa_tdesc_idx): New function.
1465 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1466 (amd64_get_ipa_tdesc): Declare.
1467
d1f28ea2
YQ
14682017-09-05 Yao Qi <yao.qi@linaro.org>
1469
1470 * configure.srv (srv_i386_linux_xmlfiles): Remove
1471 i386/i386-XXX-linux.xml from it.
1472
25a93583
YQ
14732017-09-05 Yao Qi <yao.qi@linaro.org>
1474
1475 * configure.srv: Set srv_i386_linux_regobj empty if $development
1476 is false.
1477 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1478 initialize_low_tdesc.
1479 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1480 with #if initialize_low_tdesc.
1481 * linux-x86-tdesc-selftest.c: New file.
1482 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1483
5f035c07
YQ
14842017-09-05 Yao Qi <yao.qi@linaro.org>
1485
1486 * Makefile.in (arch-i386.o): New rule.
1487 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1488 (x86_64-*-linux*): Likewise.
1489 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1490 include arch/i386.h.
1491 (i386_linux_read_description): Remove code and call
1492 i386_create_target_description.
1493 * tdesc.c (allocate_target_description): New function.
1494 * tdesc.h (set_tdesc_architecture): Remove declaration.
1495 (set_tdesc_osabi): Likewise.
1496
0abe8a89
YQ
14972017-09-05 Yao Qi <yao.qi@linaro.org>
1498
1499 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1500 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1501 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1502 .xmltarget.
1503 * server.c (get_features_xml): Call tdesc_get_features_xml.
1504 * tdesc.c (set_tdesc_architecture): New function.
1505 (set_tdesc_osabi): New function.
1506 (tdesc_get_features_xml): New function.
1507 (tdesc_create_feature): Add an argument.
1508 * tdesc.h (struct target_desc) <features>: New field.
1509 <arch, osabi>: New field.
1510 (~target_desc): xfree features, arch, and osabi.
1511 (target_desc::oerator==): Don't compare .xmltarget.
1512 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1513 (set_tdesc_osabi): Likewise.
1514 (tdesc_get_features_xml): Likewise.
1515
0a188386
YQ
15162017-09-05 Yao Qi <yao.qi@linaro.org>
1517
1518 * linux-x86-tdesc.c: Include selftest.h.
1519 (i386_tdesc_test): New function.
1520 (initialize_low_tdesc): Call selftests::register_test.
1521 * tdesc.h: Include regdef.h.
1522 (target_desc): Override operator == and !=.
1523
f49ff000
YQ
15242017-09-05 Yao Qi <yao.qi@linaro.org>
1525
1526 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1527 (ipa_obj): Likewise.
1528 * linux-i386-ipa.c: Include common/x86-xstate.h
1529 (get_ipa_tdesc): Call i386_linux_read_description.
1530 (initialize_low_tracepoint): Don't call init_registers_XXX
1531 functions, call initialize_low_tdesc instead.
1532 * linux-x86-low.c (x86_linux_read_description): Call
1533 i386_linux_read_description.
1534 (initialize_low_arch): Don't call init_registers_i386_XXX
1535 functions, call initialize_low_tdesc.
1536 * linux-x86-tdesc.c: New file.
1537 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1538 (i386_get_ipa_tdesc_idx): Declare.
1539 (i386_get_ipa_tdesc): Declare.
1540 (initialize_low_tdesc): Declare.
1541
2b68ef2f
YQ
15422017-09-05 Yao Qi <yao.qi@linaro.org>
1543
1544 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1545 instead of 0.
1546
f7000548
YQ
15472017-09-05 Yao Qi <yao.qi@linaro.org>
1548
1549 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1550 * regcache.c (get_thread_regcache): Use VEC_length.
1551 (init_register_cache): Likewise.
1552 (regcache_cpy): Likewise.
1553 (registers_to_string): Iterate reg_defs via VEC_iterate.
1554 (find_regno): Likewise.
1555 (find_register_by_number): Use VEC_index.
1556 (register_size): Call find_register_by_number.
1557 (register_data): Call find_register_by_number.
1558 (supply_regblock): Use VEC_length.
1559 (regcache_raw_read_unsigned): Likewise.
1560 * tdesc.c (init_target_desc): Iterate reg_defs via
1561 VEC_iterate.
1562 (default_description): Update initializer.
1563 (copy_target_description): Don't update field num_registers.
1564 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1565 <num_registers>: Remove.
1566
50a421ac
SM
15672017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1568
1569 * Makefile.in (.SECONDARY): Define target.
1570
23fdd69e
SM
15712017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1572
1573 * linux-low.c (linux_wait_1): Adjust.
1574 * server.c (queue_stop_reply_callback): Adjust.
1575
0a2dde4a
SDJ
15762017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1577
1578 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1579 QEnvironmentUnset and QEnvironmentReset packets.
1580 (handle_query): Inform remote that QEnvironmentHexEncoded,
1581 QEnvironmentUnset and QEnvironmentReset are supported.
1582
6afd337d
SM
15832017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1584
1585 * inferiors.h (inferior_target_data): Rename to ...
1586 (thread_target_data): ... this.
1587 (inferior_regcache_data): Rename to ...
1588 (thread_regcache_data): ... this.
1589 (set_inferior_regcache_data): Rename to ...
1590 (set_thread_regcache_data): ... this.
1591 * inferiors.c (inferior_target_data): Rename to ...
1592 (thread_target_data): ... this.
1593 (inferior_regcache_data): Rename to ...
1594 (thread_regcache_data): ... this.
1595 (set_inferior_regcache_data): Rename to ...
1596 (set_thread_regcache_data): ... this.
1597 (free_one_thread): Update.
1598 * linux-low.h (get_thread_lwp): Update.
1599 * regcache.c (get_thread_regcache): Update.
1600 (regcache_invalidate_thread): Update.
1601 (free_register_cache_thread): Update.
1602 * win32-i386-low.c (update_debug_registers_callback): Update.
1603 (win32_get_current_dr): Update.
1604 * win32-low.c (thread_rec): Update.
1605 (delete_thread_info): Update.
1606 (continue_one_thread): Update.
1607 (suspend_one_thread): Update.
1608
a160cc46
SM
16092017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1610
1611 * inferiors.c (set_inferior_target_data): Remove.
1612 * inferiors.h (set_inferior_target_data): Remove.
1613
6d580b63
YQ
16142017-08-18 Yao Qi <yao.qi@linaro.org>
1615
1616 * Makefile.in (OBS): Add selftest.o.
1617 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1618 * configure, config.in: Re-generated.
1619 * server.c: Include common/sefltest.h.
1620 (captured_main): Handle option --selftest.
1621
f5a29eb0
YQ
16222017-08-09 Yao Qi <yao.qi@linaro.org>
1623
1624 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1625 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1626 i386-avx-mpx.o and i386-mmx.o.
1627 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1628 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1629 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1630 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1631 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1632 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1633 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1634 i386/amd64-avx-mpx.xml.
1635
57757c2f
YQ
16362017-08-09 Yao Qi <yao.qi@linaro.org>
1637
1638 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1639 and x32-avx-avx512.o.
1640 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1641 i386/x32-avx-avx512.xml.
1642
229d26fc
SM
16432017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1644
1645 * tracepoint.h (enum class fast_tpoint_collect_result): New
1646 enumeration.
1647 (fast_tracepoint_collecting): Change return type to
1648 fast_tpoint_collect_result.
1649 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1650 * linux-low.h: Include tracepoint.h.
1651 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1652 fast_tpoint_collect_result.
1653 * linux-low.c (handle_tracepoints): Adjust.
1654 (linux_fast_tracepoint_collecting): Change return type to
1655 fast_tpoint_collect_result.
1656 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1657 linux_wait_1, stuck_in_jump_pad_callback,
1658 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1659 proceed_one_lwp): Adjust to type change.
1660
2e1e43e1
YQ
16612017-07-10 Yao Qi <yao.qi@linaro.org>
1662
1663 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1664
adc764e7
YQ
16652017-06-29 Yao Qi <yao.qi@linaro.org>
1666
1667 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1668 Remove.
1669 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1670
a206891a
SM
16712017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1672
1673 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1674
9a6c7d9c
SDJ
16752017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1676
1677 * linux-low.c (linux_create_inferior): Adjust code to access the
1678 environment information via 'gdb_environ' class.
1679 * lynx-low.c (lynx_create_inferior): Likewise.
1680 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1681 (get_environ): Return a pointer to 'our_environ'.
1682 (captured_main): Initialize 'our_environ'.
1683 * server.h (get_environ): Adjust prototype.
1684 * spu-low.c (spu_create_inferior): Adjust code to access the
1685 environment information via 'gdb_environ' class.
1686
ae3e2ccf
SM
16872017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1688
1689 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1690 usage of "register" keyword.
1691
3e019bdc
SM
16922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1693
1694 * configure: Re-generate.
1695
8465943a
SM
16962017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1697
1698 * configure: Re-generate.
1699
cf0dd6f0
SM
17002017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1701
1702 * Makefile.in (COMPILE.pre): Add "-x c++".
1703
9845682b
SDJ
17042017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1705
1706 * fork-child.c: Conditionally include <signal.h>.
1707
aefd8b33
SDJ
17082017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1709
1710 * server.c (handle_general_set): Handle new packet
1711 "QStartupWithShell".
1712 (handle_query): Add "QStartupWithShell" to the list of supported
1713 packets.
1714 (gdbserver_usage): Add help text explaining the
1715 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1716 options.
1717 (captured_main): Recognize and act upon the presence of the new
1718 CLI options.
1719
2090129c
SDJ
17202017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1721 Pedro Alves <palves@redhat.com>
1722
1723 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1724 * configure: Regenerate.
1725 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1726 "fork-inferior.o".
1727 (i[34567]86-*-lynxos*): Likewise.
1728 (spu*-*-*): Likewise.
1729 * fork-child.c: New file.
1730 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1731 and "environ.h".
1732 (linux_ptrace_fun): New function.
1733 (linux_create_inferior): Adjust function prototype to reflect
1734 change on "target.h". Adjust function code to use
1735 "fork_inferior".
1736 (linux_request_interrupt): Delete "signal_pid".
1737 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1738 (lynx_ptrace_fun): New function.
1739 (lynx_create_inferior): Adjust function prototype to reflect
1740 change on "target.h". Adjust function code to use
1741 "fork_inferior".
1742 * nto-low.c (nto_create_inferior): Adjust function prototype and
1743 code to reflect change on "target.h". Update comments.
1744 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1745 "common-terminal.h" and "environ.h".
1746 (terminal_fd): Moved to fork-child.c.
1747 (old_foreground_pgrp): Likewise.
1748 (restore_old_foreground_pgrp): Likewise.
1749 (last_status): Make it global.
1750 (last_ptid): Likewise.
1751 (our_environ): New variable.
1752 (startup_with_shell): Likewise.
1753 (program_name): Likewise.
1754 (program_argv): Rename to...
1755 (program_args): ...this.
1756 (wrapper_argv): New variable.
1757 (start_inferior): Delete function.
1758 (get_exec_wrapper): New function.
1759 (get_exec_file): Likewise.
1760 (get_environ): Likewise.
1761 (prefork_hook): Likewise.
1762 (post_fork_inferior): Likewise.
1763 (postfork_hook): Likewise.
1764 (postfork_child_hook): Likewise.
1765 (handle_v_run): Update code to deal with arguments coming from the
1766 remote host. Update calls from "start_inferior" to
1767 "create_inferior".
1768 (captured_main): Likewise. Initialize environment variable. Call
1769 "have_job_control".
1770 * server.h (post_fork_inferior): New prototype.
1771 (get_environ): Likewise.
1772 (last_status): Declare.
1773 (last_ptid): Likewise.
1774 (signal_pid): Likewise.
1775 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1776 (spu_ptrace_fun): New function.
1777 (spu_create_inferior): Adjust function prototype to reflect change
1778 on "target.h". Adjust function code to use "fork_inferior".
1779 * target.c (target_terminal_init): New function.
1780 (target_terminal_inferior): Likewise.
1781 (target_terminal_ours): Likewise.
1782 * target.h: Include <vector>.
1783 (struct target_ops) <create_inferior>: Update prototype.
1784 (create_inferior): Update macro.
1785 * utils.c (gdb_flush_out_err): New function.
1786 * win32-low.c (win32_create_inferior): Adjust function prototype
1787 and code to reflect change on "target.h".
1788
043a4934
SDJ
17892017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1790
1791 * inferiors.c (switch_to_thread): New function.
1792
15652511
SDJ
17932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1794
1795 * Makefile.in (SFILE): Add "common/job-control.c".
1796 (OBS): Add "job-control.o".
1797
21ea5acd
SDJ
17982017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1799
1800 * Makefile: Remove "@host_makefile_frag@".
1801
e13cb306
PA
18022017-05-05 Pedro Alves <palves@redhat.com>
1803
1804 * configure: Regenerate.
1805
c94fee56
SDJ
18062017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1807
1808 * configure: Regenerate.
1809
a0ff9e1a
SM
18102017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1811
1812 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1813 software_single_step change of return type to
1814 std::vector<CORE_ADDR>.
1815 * linux-low.c (install_software_single_step_breakpoints):
1816 Likewise.
1817 * linux-low.h (install_software_single_step_breakpoints):
1818 Likewise.
1819
be628ab8
SDJ
18202017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1821
1822 * remote-utils.c: Include "gdb_termios.h" instead of
1823 "terminal.h".
1824 * terminal.h: Delete file.
1825
7c5ded6a
SDJ
18262017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1827
1828 * server.c: Include <vector>.
1829 <program_argv, wrapper_argv>: Convert to std::vector.
1830 (start_inferior): Rewrite function to use C++.
1831 (handle_v_run): Likewise. Update code that calculates the argv
1832 based on the vRun packet; use C++.
1833 (captured_main): Likewise.
1834
436252de
SM
18352017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1836
1837 * server.c (handle_v_cont): Initialize thread_resume::thread
1838 with null_ptid.
1839
9bf2a700
PA
18402017-04-05 Pedro Alves <palves@redhat.com>
1841
1842 * configure: Regenerate.
1843
a121b7c1
PA
18442017-04-05 Pedro Alves <palves@redhat.com>
1845
1846 * gdbreplay.c (sync_error): Constify.
1847 * linux-x86-low.c (push_opcode): Constify.
1848
21c8a587
PA
18492017-04-05 Pedro Alves <palves@redhat.com>
1850
1851 * win32-low.c (get_child_debug_event)
1852 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1853 Report TARGET_WAITKIND_SPURIOUS instead.
1854
fb32b4f7
PA
18552017-04-05 Pedro Alves <palves@redhat.com>
1856
1857 * remote-utils.c (remote_prepare, remote_open): Constify.
1858 * remote-utils.h (remote_prepare, remote_open): Constify.
1859 * server.c (captured_main): Constify 'port' handling.
1860
65dd1e59
SM
18612017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1862
1863 * Makefile.in (clean): Clear .deps.
1864
8fa5b777
SM
18652017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1866
1867 * .gitignore: Remove generated files, replace with wildcard.
1868 * (clean): Replace removal of generated files with wildcard.
1869 (version.c): Replace with...
1870 (version-generated.c): ...this.
1871 (xml-builtin.c): Replace with...
1872 (xml-builtin-generated.c): ...this.
1873 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1874 (%.c: *regformats*): Replace with...
1875 (%-generated.c: *regformats*): ...this.
1876
a12e714b
MF
18772017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1878
1879 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1880 (xtensa_fill_gregset): Call collect_register_by_name for
1881 threadptr register.
1882 (xtensa_store_gregset): Call supply_register_by_name for
1883 threadptr register.
1884
1a09b50a
MF
18852017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1886
1887 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1888 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1889 (xtensa_store_gregset): Call supply_register for all registers in
1890 a0_regnum..a0_regnum + C0_NREGS range.
1891
1a01e7c6
SM
18922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1893
1894 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1895 (ax-ipa.o: ax.c): Remove.
1896 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1897 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1898 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1899 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1900 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1901
36bc18a8
SM
19022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1903
1904 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1905 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1906 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1907 (errors-ipa.o: ../common/errors.c): Remove.
1908 (format-ipa.o: ../common/format.c): Remove.
1909 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1910
a8ebe3d5
SM
19112017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1912
1913 * Makefile.in (%-ipa.o: %.c): New rule.
1914 (tracepoint-ipa.o: tracepoint.c): Remove.
1915 (utils-ipa.o: utils.c): Remove.
1916 (remote-utils-ipa.o: remote-utils.c): Remove.
1917 (regcache-ipa.o: regcache.c): Remove.
1918 (i386-linux-ipa.o: i386-linux.c): Remove.
1919 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1920 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1921 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1922 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1923 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1924 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1925 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1926 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1927 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1928 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1929 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1930 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1931 (aarch64-ipa.o: aarch64.c): Remove.
1932 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1933 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1934 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1935 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1936 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1937 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1938 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1939 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1940 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1941 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1942 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1943 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1944 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1945 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1946 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1947 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1948 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1949 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1950 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1951 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1952 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1953 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1954 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1955 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1956 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1957 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1958 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1959 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1960 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1961 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1962 (tdesc-ipa.o: tdesc.c): Remove.
1963 (x32-linux-ipa.o: x32-linux.c): Remove.
1964 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1965 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1966
50cfacb7
SM
19672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1968
1969 * Makefile.in (%.o: ../arch/%.c): New rule.
1970 (arm.o: ../arch/arm.c): Remove.
1971 (arm-linux.o: ../arch/arm-linux.c): Remove.
1972 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1973 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1974
c5a22423
SM
19752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1976
1977 * Makefile.in (%.o: ../nat/%.c): New rule.
1978 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1979 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1980 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1981 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1982 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1983 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1984 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1985 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1986 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1987 (linux-personality.o: ../nat/linux-personality.c): Remove.
1988 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1989 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1990 (x86-linux.o: ../nat/x86-linux.c): Remove.
1991 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1992 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1993
6bda016b
SM
19942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1995
1996 * Makefile.in (%.o: ../common/%.c): New rule.
1997 (signals.o: ../common/signals.c): Remove.
1998 (print-utils.o: ../common/print-utils.c): Remove.
1999 (rsp-low.o: ../common/rsp-low.c): Remove.
2000 (common-utils.o: ../common/common-utils.c): Remove.
2001 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2002 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2003 (vec.o: ../common/vec.c): Remove.
2004 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2005 (xml-utils.o: ../common/xml-utils.c): Remove.
2006 (ptid.o: ../common/ptid.c): Remove.
2007 (buffer.o: ../common/buffer.c): Remove.
2008 (format.o: ../common/format.c): Remove.
2009 (filestuff.o: ../common/filestuff.c): Remove.
2010 (agent.o: ../common/agent.c): Remove.
2011 (errors.o: ../common/errors.c): Remove.
2012 (environ.o: ../common/environ.c): Remove.
2013 (common-debug.o: ../common/common-debug.c): Remove.
2014 (cleanups.o: ../common/cleanups.c): Remove.
2015 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2016 (fileio.o: ../common/fileio.c): Remove.
2017 (common-regcache.o: ../common/common-regcache.c): Remove.
2018 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2019 (new-op.o: ../common/new-op.c): Remove.
2020 (btrace-common.o: ../common/btrace-common.c): Remove.
2021
21122961
SM
20222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2023
2024 * Makefile.in (%.o: ../target/%.c): New rule.
2025 (waitstatus.o: ../target/waitstatus.c): Remove.
2026
c362e621
SM
20272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2028
2029 * Makefile.in
2030 (%.c: ../regformats/%.dat,
2031 (%.c: ../regformats/arm/%.dat,
2032 (%.c: ../regformats/i386/%.dat,
2033 (%.c: ../regformats/rs6000/%.dat): New rules.
2034 (aarch64.c): Remove.
2035 (reg-arm.c): Remove.
2036 (arm-with-iwmmxt.c): Remove.
2037 (arm-with-vfpv2.c): Remove.
2038 (arm-with-vfpv3.c): Remove.
2039 (arm-with-neon.c): Remove.
2040 (reg-bfin.c): Remove.
2041 (reg-cris.c): Remove.
2042 (reg-crisv32.c): Remove.
2043 (i386.c): Remove.
2044 (i386-linux.c): Remove.
2045 (i386-avx.c): Remove.
2046 (i386-avx-linux.c): Remove.
2047 (i386-avx-avx512.c): Remove.
2048 (i386-avx-avx512-linux.c): Remove.
2049 (i386-mpx.c): Remove.
2050 (i386-mpx-linux.c): Remove.
2051 (i386-avx-mpx-avx512-pku.c): Remove.
2052 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2053 (i386-avx-mpx.c): Remove.
2054 (i386-avx-mpx-linux.c): Remove.
2055 (i386-mmx.c): Remove.
2056 (i386-mmx-linux.c): Remove.
2057 (reg-ia64.c): Remove.
2058 (reg-m32r.c): Remove.
2059 (reg-m68k.c): Remove.
2060 (reg-cf.c): Remove.
2061 (mips-linux.c): Remove.
2062 (mips-dsp-linux.c): Remove.
2063 (mips64-linux.c): Remove.
2064 (mips64-dsp-linux.c): Remove.
2065 (nios2-linux.c): Remove.
2066 (powerpc-32.c): Remove.
2067 (powerpc-32l.c): Remove.
2068 (powerpc-altivec32l.c): Remove.
2069 (powerpc-cell32l.c): Remove.
2070 (powerpc-vsx32l.c): Remove.
2071 (powerpc-isa205-32l.c): Remove.
2072 (powerpc-isa205-altivec32l.c): Remove.
2073 (powerpc-isa205-vsx32l.c): Remove.
2074 (powerpc-e500l.c): Remove.
2075 (powerpc-64l.c): Remove.
2076 (powerpc-altivec64l.c): Remove.
2077 (powerpc-cell64l.c): Remove.
2078 (powerpc-vsx64l.c): Remove.
2079 (powerpc-isa205-64l.c): Remove.
2080 (powerpc-isa205-altivec64l.c): Remove.
2081 (powerpc-isa205-vsx64l.c): Remove.
2082 (s390-linux32.c): Remove.
2083 (s390-linux32v1.c): Remove.
2084 (s390-linux32v2.c): Remove.
2085 (s390-linux64.c): Remove.
2086 (s390-linux64v1.c): Remove.
2087 (s390-linux64v2.c): Remove.
2088 (s390-te-linux64.c): Remove.
2089 (s390-vx-linux64.c): Remove.
2090 (s390-tevx-linux64.c): Remove.
2091 (s390x-linux64.c): Remove.
2092 (s390x-linux64v1.c): Remove.
2093 (s390x-linux64v2.c): Remove.
2094 (s390x-te-linux64.c): Remove.
2095 (s390x-vx-linux64.c): Remove.
2096 (s390x-tevx-linux64.c): Remove.
2097 (tic6x-c64xp-linux.c): Remove.
2098 (tic6x-c64x-linux.c): Remove.
2099 (tic6x-c62x-linux.c): Remove.
2100 (reg-sh.c): Remove.
2101 (reg-sparc64.c): Remove.
2102 (reg-spu.c): Remove.
2103 (amd64.c): Remove.
2104 (amd64-linux.c): Remove.
2105 (amd64-avx.c): Remove.
2106 (amd64-avx-linux.c): Remove.
2107 (amd64-avx-avx512.c): Remove.
2108 (amd64-avx-avx512-linux.c): Remove.
2109 (amd64-mpx.c): Remove.
2110 (amd64-mpx-linux.c): Remove.
2111 (amd64-avx-mpx-avx512-pku.c): Remove.
2112 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2113 (amd64-avx-mpx.c): Remove.
2114 (amd64-avx-mpx-linux.c): Remove.
2115 (x32.c): Remove.
2116 (x32-linux.c): Remove.
2117 (x32-avx.c): Remove.
2118 (x32-avx-linux.c): Remove.
2119 (x32-avx-avx512.c): Remove.
2120 (x32-avx-avx512-linux.c): Remove.
2121 (reg-xtensa.c): Remove.
2122 (reg-tilegx.c): Remove.
2123 (reg-tilegx32.c): Remove.
2124
1672e0d9
SDJ
21252017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2126
2127 * Makefile.in (SFILES): Add "common/environ.c".
2128 (OBJS): Add "common/environ.h".
2129
239b6d10
WT
21302017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2131
2132 * configure.ac: Check if the fs_base and gs_base members of
2133 `struct user_regs_struct' exist.
2134 * config.in: Regenerated.
2135 * configure: Likewise.
2136
694b382c
AT
21372017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2138
2139 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2140 target_read_memory.
2141 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2142 (get_next_pcs_syscall_next_pc): Likewise.
2143
7dc53023
LM
21442016-12-23 Luis Machado <lgustavo@codesourcery.com>
2145
2146 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2147 * nto-x86-low.c: Likewise.
2148
ad02e4fe
SM
21492016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2150
2151 * Makefile.in: Include disable-implicit-rules.mk.
2152
dcb07cfa
PA
21532016-11-23 Pedro Alves <palves@redhat.com>
2154
2155 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2156 (debug_vprintf): Use std::chrono::steady_clock instead of
2157 gettimeofday. Use '.' instead of ':'.
2158 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2159 (get_timestamp): Use std::chrono::steady_clock instead of
2160 gettimeofday.
2161
8629c02c
SM
21622016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2163
2164 * Makefile.in: Fix whitespace formatting.
2165
b593ecca
SM
21662016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2167
2168 * Makefile.in (SFILES, OBS): Flatten list and order
2169 alphabetically.
2170
9986ba08
PA
21712016-11-23 Pedro Alves <palves@redhat.com>
2172
2173 * event-loop.c (handle_file_event): Use warning.
2174 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2175 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2176 Use warning.
2177
4eefa7bc
PA
21782016-11-23 Pedro Alves <palves@redhat.com>
2179
2180 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2181 output.
2182 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2183 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2184 debug_printf and debug_flush for debug output.
2185 * server.c (handle_general_set): Likewise.
2186 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2187 output.
2188
5443506e
SM
21892016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2190
2191 * Makefile.in (.c.o): Replace rule with ...
2192 (%.o: %.c): ... this one.
2193
3b165252
SM
21942016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2195
2196 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2197 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2198 make.
2199 * configure.ac: Remove checks for the make program.
2200 * configure: Re-generate.
2201
0bcda685
PA
22022016-10-28 Pedro Alves <palves@redhat.com>
2203
2204 * Makefile.in (CXX_DIALECT): Get from configure.
2205 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2206 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2207 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2208 * config.in: Regenerate.
2209 * configure: Regenerate.
2210
c3805894
YQ
22112016-10-27 Yao Qi <yao.qi@linaro.org>
2212
2213 * linux-low.c (linux_supports_range_stepping): Return true if
2214 can_software_single_step return true.
2215
89342618
YQ
22162016-10-27 Yao Qi <yao.qi@linaro.org>
2217
2218 * inferiors.c (find_inferior_in_random): New function.
2219 * inferiors.h (find_inferior_in_random): Declare.
2220 * linux-low.c (linux_wait_for_event_filtered): Call
2221 find_inferior_in_random instead of find_inferior.
2222
e3652c84
YQ
22232016-10-27 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-low.c (linux_wait_1): If single-step breakpoints are
2226 inserted, remove them.
2227
5a04c4cf
PA
22282016-10-26 Pedro Alves <palves@redhat.com>
2229
2230 * linux-low.c (handle_extended_wait): Link parent/child fork
2231 threads.
2232 (linux_wait_1): Unlink them.
2233 (linux_set_resume_request): Ignore resume requests for
2234 already-resumed and unhandled fork child threads.
2235 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2236 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2237 New functions.
2238 (handle_v_requests) <vCont>: Don't call require_running.
2239 * server.h (in_queued_stop_replies): New declaration.
2240
cb93dc7f
YQ
22412016-10-24 Yao Qi <yao.qi@linaro.org>
2242
2243 PR server/20733
2244 * linux-aarch64-low.c (append_insns): Cast the return value to
2245 'uint32_t *'.
2246
a1078bea
YQ
22472016-10-10 Yao Qi <yao.qi@linaro.org>
2248
2249 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2250
1fb77080
SDJ
22512016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2252
2253 * target.c (target_supports_multi_process): New function, moved
2254 from...
2255 * target.h (target_supports_multi_process): ... here. Remove
2256 macro.
2257
39b5a3b9
TT
22582016-10-05 Tom Tromey <tom@tromey.com>
2259
2260 PR remote/20655:
2261 * tracepoint.c (handle_tracepoint_bkpts): Check
2262 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2263
c1d0b70a
YQ
22642016-10-05 Yao Qi <yao.qi@linaro.org>
2265
2266 * configure.srv: Update the path of arm-*.xml files.
2267
0a69eedb
YQ
22682016-10-05 Terry Guo <terry.guo@arm.com>
2269 Yao Qi <yao.qi@linaro.org>
2270
2271 * Makefile.in: Adjust the path of rules.
2272 * configure.srv: Update the path of xml files.
2273 * regformats/arm-with-iwmmxt.dat: Regenerated.
2274 * regformats/arm-with-neon.dat: Likewise.
2275 * regformats/arm-with-vfpv2.dat: Likewise.
2276 * regformats/arm-with-vfpv3.dat Likewise.
2277
17e16485
YQ
22782016-09-30 Yao Qi <yao.qi@linaro.org>
2279
2280 PR gdbserver/20627
2281 * target.c (target_stop_and_wait): Don't call
2282 target_continue_no_signal, use resume_stop instead.
2283
edeeb602
YQ
22842016-09-26 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-low.c (linux_wait_1): Call debug_exit.
2287
503b1c39
PA
22882016-09-23 Pedro Alves <palves@redhat.com>
2289
2290 * Makefile.in (SFILES): Add common/new-op.c.
2291 (OBS): Add common/new-op.o.
2292 (new-op.o): New rule.
2293
74172ecf
SM
22942016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2295
2296 * .gitinore: Ignore more files.
2297
fc6cda2e
YQ
22982016-09-21 Yao Qi <yao.qi@linaro.org>
2299
2300 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2301 23.
2302
bc1e6c81
SDJ
23032016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2304
2305 * server.c (start_inferior): Call target_mourn_inferior instead of
2306 mourn_inferior; pass ptid_t argument to it.
2307 (resume): Likewise.
2308 (handle_target_event): Likewise.
2309 * target.c (target_mourn_inferior): New function.
2310 * target.h (mourn_inferior): Delete macro.
2311
0e00e962
AA
23122016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2313
2314 * linux-low.c (lwp_is_stepping): New function.
2315
1d8cb77d
CL
23162016-09-06 Carl Love <cel@us.ibm.com>
2317
2318 * server.c (start_inferior): Fixed comment, requested comment change
2319 didn't get updated correctly. Removed reference to ptrace () call as
2320 it is only true on Linux systems.
2321
7313bced
CL
23222016-09-06 Carl Love <cel@us.ibm.com>
2323
2324 * server.c (start_inferior): Do not call
2325 function target_post_create_inferior () if the
2326 inferior process has already exited.
2327
cf6de44d
PA
23282016-09-05 Pedro Alves <palves@redhat.com>
2329
2330 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2331 (COMPILE.pre, CC_LD): Use CXX directly.
2332 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2333 * acinclude.m4: Don't include build-with-cxx.m4.
2334 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2335 * configure: Regenerate.
2336
c1da6748
AT
23372016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2338
2339 PR gdb/19495
2340 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2341 call writing data to own_buf.
2342
f2b9e3df
SDJ
23432016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2344
2345 * target.c (mywait): Call target_wait instead of
2346 the_target->wait.
2347 (target_wait): New function.
2348
049a8570
SDJ
23492016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2350
2351 * server.c (start_inferior): New variable 'ptid'. Replace calls
2352 to the_target->resume by target_continue{,_no_signal}, depending
2353 on the case.
2354 * target.c (target_stop_and_wait): Call target_continue_no_signal
2355 instead of the_target->resume.
2356 (target_continue): New function.
2357
3aa5cfa0
AT
23582016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2359
2360 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2361
754653a7
AZ
23622016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2363
2364 PR server/20491
2365 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2366 ps_prochandle.
2367 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2368 * linux-arm-low.c (ps_get_thread_area): Likewise.
2369 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2370 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2371 * linux-mips-low.c (ps_get_thread_area): Likewise.
2372 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2373 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2374 * linux-x86-low.c (ps_get_thread_area): Likewise.
2375 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2376
ed036b40
PA
23772016-08-19 Pedro Alves <palves@redhat.com>
2378
2379 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2380
c8ef42ee
PA
23812016-08-19 Pedro Alves <palves@redhat.com>
2382
2383 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2384 comment. Use memcpy instead of casting through unsigned long.
2385
9c235a72
PA
23862016-08-19 Pedro Alves <palves@redhat.com>
2387
2388 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2389 allocating around 0x80000000.
2390
201506da
PA
23912016-08-19 Pedro Alves <palves@redhat.com>
2392
2393 PR gdb/20415
2394 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2395 (x32-avx512-linux-ipa.o): New rules.
2396 * configure.ac (x86_64-*-linux*): New x32 check.
2397 * configure.srv (ipa_x32_linux_regobj): New.
2398 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2399 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2400 descriptions.
2401 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2402 descriptions.
2403 * configure: Regenerate.
2404
f348d89a
PA
24052016-08-09 Pedro Alves <palves@redhat.com>
2406
2407 PR gdb/18653
2408 * Makefile.in (OBS): Add signals-state-save-restore.o.
2409 (signals-state-save-restore.o): New rule.
2410 * config.in: Regenerate.
2411 * configure: Regenerate.
2412 * linux-low.c: Include "signals-state-save-restore.h".
2413 (linux_create_inferior): Call
2414 restore_original_signals_state.
2415 * server.c: Include "dispositions-save-restore.h".
2416 (captured_main): Call save_original_signals_state.
2417
1baf5149
PA
24182016-08-05 Pedro Alves <palves@redhat.com>
2419
2420 * configure: Regenerate.
2421
fcd4a73d
YQ
24222016-08-04 Yao Qi <yao.qi@linaro.org>
2423
2424 * linux-low.c (regsets_fetch_inferior_registers): Check
2425 errno is ESRCH or not.
2426
979659d0
YQ
24272016-08-02 Yao Qi <yao.qi@linaro.org>
2428
2429 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2430 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2431 (thread_db_load_search): Update.
2432 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2433 td_ta_set_event and td_ta_event_getmsg.
2434
6598661d
PA
24352016-07-26 Pedro Alves <palves@redhat.com>
2436
2437 PR server/20414
2438 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2439 of unsigned long for 64-bit registers and use uint32_t instead of
2440 unsigned int for 32-bit registers.
2441
9cf12d57
PA
24422016-07-26 Pedro Alves <palves@redhat.com>
2443
2444 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2445 to 'ptrace'.
2446
305450ed
TT
24472016-07-21 Tom Tromey <tom@tromey.com>
2448
2449 * configure: Rebuild.
2450
2583da7c
YQ
24512016-07-21 Yao Qi <yao.qi@linaro.org>
2452
2453 * mem-break.c (find_gdb_breakpoint): Cast bp to
2454 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2455
21536b36
YQ
24562016-07-21 Yao Qi <yao.qi@linaro.org>
2457
2458 * server.c (handle_v_requests): Support s and S actions
2459 if target_supports_software_single_step return true.
2460
8901d193
YQ
24612016-07-21 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2464 is resume_step, call maybe_hw_step.
2465 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2466 and unstop them.
2467 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2468 breakpoints or not.
2469 (proceed_one_lwp): If resume request is resume_step, install
2470 reinsert breakpoints and call maybe_hw_step.
2471
0e9a339e
YQ
24722016-07-21 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-low.c (proceed_one_lwp): Declare.
2475 (linux_resume_one_thread): Remove local variable 'step'.
2476 Lift code enqueue signal. Call proceed_one_lwp instead of
2477 linux_resume_one_lwp.
2478
4281b351
YQ
24792016-07-21 Yao Qi <yao.qi@linaro.org>
2480
2481 * linux-low.c (linux_resume_one_thread): Call
2482 enqueue_pending_signal.
2483
984a2c04
YQ
24842016-07-21 Yao Qi <yao.qi@linaro.org>
2485
2486 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2487 * inferiors.c (do_restore_current_thread_cleanup): New function.
2488 (make_cleanup_restore_current_thread): Likewise.
2489 * linux-low.c (install_software_single_step_breakpoints): Call
2490 make_cleanup_restore_current_thread. Switch current_thread to
2491 thread.
2492
bec903c9
YQ
24932016-07-21 Yao Qi <yao.qi@linaro.org>
2494
2495 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2496 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2497 (clone_one_breakpoint): Likewise.
2498 (delete_reinsert_breakpoints): Change parameter to thread.
2499 Callers updated.
2500 (has_reinsert_breakpoints): Likewise.
2501 (uninsert_reinsert_breakpoints): Likewise.
2502 (reinsert_reinsert_breakpoints): Likewise.
2503 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2504 (delete_reinsert_breakpoints): Likewise.
2505 (reinsert_reinsert_breakpoints): Likewise.
2506 (uninsert_reinsert_breakpoints): Likewise.
2507 (has_reinsert_breakpoints): Likewise.
2508
63c40ec7
YQ
25092016-07-21 Yao Qi <yao.qi@linaro.org>
2510
2511 * inferiors.c (get_thread_process): Make parameter const.
2512 * inferiors.h (get_thread_process): Update declaration.
2513 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2514 Add new parameters child_thread and parent_thread. Callers
2515 updated.
2516 * mem-break.h (clone_all_breakpoints): Update declaration.
2517
9aa76cd0
YQ
25182016-07-21 Yao Qi <yao.qi@linaro.org>
2519
2520 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2521 <command_list, handler>: Remove.
2522 (struct gdb_breakpoint): New.
2523 (struct other_breakpoint): New.
2524 (struct reinsert_breakpoint): New.
2525 (is_gdb_breakpoint): New function.
2526 (any_persistent_commands): Update command_list if
2527 is_gdb_breakpoint returns true.
2528 (set_breakpoint): Create breakpoints according to their types.
2529 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2530 (set_gdb_breakpoint_1): Likewise.
2531 (set_gdb_breakpoint): Likewise.
2532 (clear_breakpoint_conditions): Change parameter type to
2533 'struct gdb_breakpoint *'.
2534 (clear_breakpoint_commands): Likewise.
2535 (clear_breakpoint_conditions_and_commands): Likewise.
2536 (add_condition_to_breakpoint): Likewise.
2537 (add_breakpoint_condition): Likewise.
2538 (add_commands_to_breakpoint): Likewise.
2539 (check_breakpoints): Check other_breakpoint.
2540 (clone_one_breakpoint): Clone breakpopint according to its type.
2541 * mem-break.h (struct gdb_breakpoint): Declare.
2542 (set_gdb_breakpoint): Update declaration.
2543 (clear_breakpoint_conditions_and_commands): Likewise.
2544 (add_breakpoint_condition): Likewise.
2545 (add_breakpoint_commands): Likewise.
2546 * server.c (process_point_options): Change parameter type to
2547 'struct gdb_breakpoint *'.
2548
811f8301
YQ
25492016-07-21 Yao Qi <yao.qi@linaro.org>
2550
2551 * mem-break.c (set_breakpoint_at): Rename it to ...
2552 (set_breakpoint_type_at): ... it.
2553 (set_breakpoint_at): Call set_breakpoint_type_at.
2554 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2555 * mem-break.h (set_breakpoint_at): Update comments.
2556
b1c51e36
CLT
25572016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2558
2559 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2560 to buf parameter.
2561 (nios2_store_gregset): Likewise.
2562
ced2dffb
PA
25632016-07-01 Pedro Alves <palves@redhat.com>
2564 Antoine Tremblay <antoine.tremblay@ericsson.com>
2565
2566 * linux-low.c: Change interface to take the target lwp_info
2567 pointer directly and return void. Handle detaching from a zombie
2568 thread.
2569 (linux_detach_lwp_callback): New function.
2570 (linux_detach): Detach from the leader thread after detaching from
2571 the clone threads.
2572
2ac09a5b
YQ
25732016-06-28 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2576 for variable new_offset.
2577 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2578 (aarch64_ftrace_insn_reloc_cb): Likewise.
2579 (aarch64_ftrace_insn_reloc_tb): Likewise.
2580 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2581 PRIx64 instead of PRIx32.
2582
79e7fd4f
YQ
25832016-06-28 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2586 (the_low_target): Install arm_get_syscall_trapinfo.
2587
061fc021
YQ
25882016-06-28 Yao Qi <yao.qi@linaro.org>
2589
2590 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2591 function.
2592 (the_low_target): Install aarch64_get_syscall_trapinfo.
2593
4cc32bec
YQ
25942016-06-28 Yao Qi <yao.qi@linaro.org>
2595
2596 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2597 Callers updated.
2598 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2599 Remove parameter sysno.
2600 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2601 sysret.
2602
782c1122
AA
26032016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2604
2605 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2606 (s390_emit_ne_goto): Likewise.
2607 (s390_emit_lt_goto): Likewise.
2608 (s390_emit_le_goto): Likewise.
2609 (s390_emit_gt_goto): Likewise.
2610 (s390_emit_ge_goto): Likewise.
2611 (s390x_emit_eq_goto): Likewise.
2612 (s390x_emit_ne_goto): Likewise.
2613 (s390x_emit_lt_goto): Likewise.
2614 (s390x_emit_le_goto): Likewise.
2615 (s390x_emit_gt_goto): Likewise.
2616 (s390x_emit_ge_goto): Likewise.
2617 (s390_emit_ops_impl): Mark variable static.
2618 (s390x_emit_ops): Likewise.
2619
2e7b624b
YQ
26202016-06-17 Yao Qi <yao.qi@linaro.org>
2621
2622 * linux-low.c (handle_extended_wait): Call
2623 uninsert_reinsert_breakpoints for the parent process. Remove
2624 reinsert breakpoints from the child process. Reinsert them to
2625 the parent process when vfork is done.
2626 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2627 (reinsert_reinsert_breakpoints): New function.
2628 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2629 (reinsert_reinsert_breakpoints): Declare.
2630
8a81c5d7
YQ
26312016-06-17 Yao Qi <yao.qi@linaro.org>
2632
2633 * linux-low.c (handle_extended_wait): If the parent is doing
2634 step-over, remove the reinsert breakpoints from the forked child.
2635
f50bf8e5
YQ
26362016-06-17 Yao Qi <yao.qi@linaro.org>
2637
2638 * linux-low.c (unsuspend_all_lwps): Declare.
2639 (linux_low_filter_event): If thread exited, call finish_step_over.
2640 If step-over is finished, unsuspend other threads.
2641
8376a3cb
YQ
26422016-06-17 Yao Qi <yao.qi@linaro.org>
2643
2644 * linux-low.c (linux_resume_one_lwp_throw): Assert
2645 has_reinsert_breakpoints returns false.
2646 * mem-break.c (delete_disabled_breakpoints): Assert
2647 bp type isn't reinsert_breakpoint.
2648
f79b145d
YQ
26492016-06-17 Yao Qi <yao.qi@linaro.org>
2650
2651 * linux-low.c (maybe_hw_step): New function.
2652 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2653 (finish_step_over): Switch current_thread to lwp temporarily,
2654 and assert has_reinsert_breakpoints returns true.
2655 (proceed_one_lwp): Call maybe_hw_step.
2656 * mem-break.c (has_reinsert_breakpoints): New function.
2657 * mem-break.h (has_reinsert_breakpoints): Declare.
2658
0ae534d2
JT
26592016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2660
2661 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2662
fcdad592
YQ
26632016-05-17 Yao Qi <yao.qi@linaro.org>
2664
2665 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2666 instead of find_inferior.
2667
9e784964
YQ
26682016-05-05 Yao Qi <yao.qi@linaro.org>
2669
2670 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2671 Initialize res to zero.
2672
cf2ebb6e
YQ
26732016-05-05 Yao Qi <yao.qi@linaro.org>
2674
2675 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2676 to uint32_t.
2677
c1aebf87
UW
26782016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2679
2680 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2681 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2682 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2683
35fd2deb 26842016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2685 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2686
2687 * tracepoint.c (write_inferior_int8): New function.
2688 (cmd_qtenable_disable): Write enable flag using
2689 write_inferior_int8.
2690
484b3c32
YQ
26912016-04-25 Yao Qi <yao.qi@linaro.org>
2692
2693 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2694 (need_step_over_p): Return zero if the LWP has pending signals
2695 can be delivered on software single step target.
2696
85ba7d86
YQ
26972016-04-25 Yao Qi <yao.qi@linaro.org>
2698
2699 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2700 return instead of error.
2701
3539aa13
YQ
27022016-04-22 Yao Qi <yao.qi@linaro.org>
2703
2704 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2705 to 23.
2706
5b061e98
YQ
27072016-04-22 Yao Qi <yao.qi@linaro.org>
2708
2709 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2710 signal when stepping over breakpoint with software single
2711 step.
2712
3451269c
PA
27132016-04-21 Pedro Alves <palves@redhat.com>
2714
2715 * linux-s390-low.c (s390_collect_ptrace_register)
2716 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2717 add casts.
2718 (s390_check_regset): Use void * instead of gdb_byte *.
2719
a2358508
PA
27202016-04-20 Pedro Alves <palves@redhat.com>
2721
2722 * configure: Renegerate.
2723
6885166d
YQ
27242016-04-20 Yao Qi <yao.qi@linaro.org>
2725
2726 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2727 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2728 number 16.
2729 (arm_store_gregset): Likewise.
2730
2b863f51
WT
27312016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2732
2733 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2734 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2735 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2736 (amd64-avx-mpx-linux.c): New rules.
2737 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2738 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2739 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2740 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2741 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2742 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2743 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2744 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2745 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2746 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2747 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2748 * linux-x86-low.c (x86_linux_read_description): Add case for
2749 X86_XSTATE_AVX_MPX_MASK.
2750 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2751 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2752 init_registers_i386_avx_mpx_linux.
2753 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2754 (initialize_low_tracepoint): Call
2755 init_registers_i386_avx_mpx_linux.
2756 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2757 (initialize_low_tracepoint): Call
2758 init_registers_amd64_avx_mpx_linux.
2759 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2760 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2761 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2762 declarations.
2763
9b30624b
PA
27642016-04-18 Pedro Alves <palves@redhat.com>
2765
2766 * configure: Regenerate.
2767
45e3745e
AT
27682016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2769
2770 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2771 (aarch64_emit_sub): Likewise.
2772
2afc13ff
PA
27732016-04-12 Pedro Alves <palves@redhat.com>
2774
2775 * utils.c (prepare_to_throw_exception): Delete.
2776
6e774b13
SM
27772016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2778
2779 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2780
4dca19f8
MK
27812016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2782
2783 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2784
d0a9981f
MK
27852016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2786
2787 * linux-aarch64-ipa.c: Add <elf.h> include.
2788 * linux-ppc-ipa.c: Add <elf.h> include.
2789 * linux-s390-ipa.c: Add <elf.h> include.
2790
252db07e
MK
27912016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2792
2793 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2794 (get_raw_reg_ptr): Likewise.
2795 (get_trace_state_variable_value_ptr): Likewise.
2796 (set_trace_state_variable_value_ptr): Likewise.
2797 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2798 char *.
2799
14e2b6d9
MK
28002016-03-31 Wei-cheng Wang <cole945@gmail.com>
2801 Marcin Kościelnicki <koriakin@0x04.net>
2802
2803 PR/17221
2804 * linux-ppc-low.c (emit_insns): New function.
2805 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2806 (ppc_emit_prologue): New function.
2807 (ppc_emit_epilogue): New function.
2808 (ppc_emit_add): New function.
2809 (ppc_emit_sub): New function.
2810 (ppc_emit_mul): New function.
2811 (ppc_emit_lsh): New function.
2812 (ppc_emit_rsh_signed): New function.
2813 (ppc_emit_rsh_unsigned): New function.
2814 (ppc_emit_ext): New function.
2815 (ppc_emit_zero_ext): New function.
2816 (ppc_emit_log_not): New function.
2817 (ppc_emit_bit_and): New function.
2818 (ppc_emit_bit_or): New function.
2819 (ppc_emit_bit_xor): New function.
2820 (ppc_emit_bit_not): New function.
2821 (ppc_emit_equal): New function.
2822 (ppc_emit_less_signed): New function.
2823 (ppc_emit_less_unsigned): New function.
2824 (ppc_emit_ref): New function.
2825 (ppc_emit_const): New function.
2826 (ppc_emit_reg): New function.
2827 (ppc_emit_pop): New function.
2828 (ppc_emit_stack_flush): New function.
2829 (ppc_emit_swap): New function.
2830 (ppc_emit_stack_adjust): New function.
2831 (ppc_emit_call): New function.
2832 (ppc_emit_int_call_1): New function.
2833 (ppc_emit_void_call_2): New function.
2834 (ppc_emit_if_goto): New function.
2835 (ppc_emit_goto): New function.
2836 (ppc_emit_eq_goto): New function.
2837 (ppc_emit_ne_goto): New function.
2838 (ppc_emit_lt_goto): New function.
2839 (ppc_emit_le_goto): New function.
2840 (ppc_emit_gt_goto): New function.
2841 (ppc_emit_ge_goto): New function.
2842 (ppc_write_goto_address): New function.
2843 (ppc_emit_ops_impl): New static variable.
2844 (ppc64v1_emit_prologue): New function.
2845 (ppc64v2_emit_prologue): New function.
2846 (ppc64_emit_epilogue): New function.
2847 (ppc64_emit_add): New function.
2848 (ppc64_emit_sub): New function.
2849 (ppc64_emit_mul): New function.
2850 (ppc64_emit_lsh): New function.
2851 (ppc64_emit_rsh_signed): New function.
2852 (ppc64_emit_rsh_unsigned): New function.
2853 (ppc64_emit_ext): New function.
2854 (ppc64_emit_zero_ext): New function.
2855 (ppc64_emit_log_not): New function.
2856 (ppc64_emit_bit_and): New function.
2857 (ppc64_emit_bit_or): New function.
2858 (ppc64_emit_bit_xor): New function.
2859 (ppc64_emit_bit_not): New function.
2860 (ppc64_emit_equal): New function.
2861 (ppc64_emit_less_signed): New function.
2862 (ppc64_emit_less_unsigned): New function.
2863 (ppc64_emit_ref): New function.
2864 (ppc64_emit_const): New function.
2865 (ppc64v1_emit_reg): New function.
2866 (ppc64v2_emit_reg): New function.
2867 (ppc64_emit_pop): New function.
2868 (ppc64_emit_stack_flush): New function.
2869 (ppc64_emit_swap): New function.
2870 (ppc64v1_emit_call): New function.
2871 (ppc64v2_emit_call): New function.
2872 (ppc64v1_emit_int_call_1): New function.
2873 (ppc64v2_emit_int_call_1): New function.
2874 (ppc64v1_emit_void_call_2): New function.
2875 (ppc64v2_emit_void_call_2): New function.
2876 (ppc64_emit_if_goto): New function.
2877 (ppc64_emit_eq_goto): New function.
2878 (ppc64_emit_ne_goto): New function.
2879 (ppc64_emit_lt_goto): New function.
2880 (ppc64_emit_le_goto): New function.
2881 (ppc64_emit_gt_goto): New function.
2882 (ppc64_emit_ge_goto): New function.
2883 (ppc64v1_emit_ops_impl): New static variable.
2884 (ppc64v2_emit_ops_impl): New static variable.
2885 (ppc_emit_ops): New function.
2886 (linux_low_target): Wire in ppc_emit_ops.
2887
a2174ba4
MK
28882016-03-31 Wei-cheng Wang <cole945@gmail.com>
2889 Marcin Kościelnicki <koriakin@0x04.net>
2890
2891 PR/17221
2892 * Makefile.in: Add powerpc-*-ipa.o
2893 * configure.srv: Add ipa_obj for powerpc*-linux.
2894 * linux-ppc-ipa.c: New file.
2895 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2896 includes.
2897 (PPC_FIELD): New macro.
2898 (PPC_SEXT): New macro.
2899 (PPC_OP6): New macro.
2900 (PPC_BO): New macro.
2901 (PPC_LI): New macro.
2902 (PPC_BD): New macro.
2903 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2904 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2905 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2906 (ppc_get_thread_area): New function.
2907 (is_elfv2_inferior): New function.
2908 (gen_ds_form): New function.
2909 (GEN_STD): New macro.
2910 (GEN_STDU): New macro.
2911 (GEN_LD): New macro.
2912 (GEN_LDU): New macro.
2913 (gen_d_form): New function.
2914 (GEN_ADDI): New macro.
2915 (GEN_ADDIS): New macro.
2916 (GEN_LI): New macro.
2917 (GEN_LIS): New macro.
2918 (GEN_ORI): New macro.
2919 (GEN_ORIS): New macro.
2920 (GEN_LWZ): New macro.
2921 (GEN_STW): New macro.
2922 (GEN_STWU): New macro.
2923 (gen_xfx_form): New function.
2924 (GEN_MFSPR): New macro.
2925 (GEN_MTSPR): New macro.
2926 (GEN_MFCR): New macro.
2927 (GEN_MTCR): New macro.
2928 (GEN_SYNC): New macro.
2929 (GEN_LWSYNC): New macro.
2930 (gen_x_form): New function.
2931 (GEN_OR): New macro.
2932 (GEN_MR): New macro.
2933 (GEN_LWARX): New macro.
2934 (GEN_STWCX): New macro.
2935 (GEN_CMPW): New macro.
2936 (gen_md_form): New function.
2937 (GEN_RLDICL): New macro.
2938 (GEN_RLDICR): New macro.
2939 (gen_i_form): New function.
2940 (GEN_B): New macro.
2941 (GEN_BL): New macro.
2942 (gen_b_form): New function.
2943 (GEN_BNE): New macro.
2944 (GEN_LOAD): New macro.
2945 (GEN_STORE): New macro.
2946 (gen_limm): New function.
2947 (gen_atomic_xchg): New function.
2948 (gen_call): New function.
2949 (ppc_relocate_instruction): New function.
2950 (ppc_install_fast_tracepoint_jump_pad): New function.
2951 (ppc_get_min_fast_tracepoint_insn_len): New function.
2952 (ppc_get_ipa_tdesc_idx): New function.
2953 (the_low_target): Wire in the new functions.
2954 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2955 tdescs.
2956 * linux-ppc-tdesc.h: New file.
2957
a13c4696
MK
29582016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2959
2960 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2961 (alloc_jump_pad_buffer): New function.
2962 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2963 (alloc_jump_pad_buffer): New function.
2964 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2965 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2966 (alloc_jump_pad_buffer): New function.
2967 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2968 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2969 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2970 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2971
1cda1512
MK
29722016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2973
2974 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2975 * linux-amd64-ipa.c: Likewise.
2976 * linux-i386-ipa.c: Likewise.
2977 * linux-s390-ipa.c: Likewise.
2978 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2979 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2980 set_trace_state_variable_value_ptr.
2981 (struct ipa_sym_addresses): Likewise.
2982 (symbol_list): Likewise.
2983 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2984 accessing gdb_collect directly.
2985 (gdb_collect_ptr_type): New typedef.
2986 (get_raw_reg_ptr_type): New typedef.
2987 (get_trace_state_variable_value_ptr_type): New typedef.
2988 (set_trace_state_variable_value_ptr_type): New typedef.
2989 (gdb_collect_ptr): New global.
2990 (get_raw_reg_ptr): New global.
2991 (get_trace_state_variable_value_ptr): New global.
2992 (set_trace_state_variable_value_ptr): New global.
2993 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2994 accessing get_raw_reg directly.
2995 (get_get_tsv_func_addr): Likewise for
2996 get_trace_state_variable_value_ptr.
2997 (get_set_tsv_func_addr): Likewise for
2998 set_trace_state_variable_value_ptr.
2999 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3000
72fb5488
SM
30012016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3002
3003 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3004
28170b88
MK
30052016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3006
3007 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3008 packets.
3009 (relocate_instruction): Remove own_buf.
3010 * server.c (own_buf): Make global.
3011 (handle_v_requests): Make global.
3012 * server.h (own_buf): New declaration.
3013 (handle_v_requests): New prototype.
3014
f39e8743
MK
30152016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3016
3017 PR 18377
3018 * linux-s390-low.c (add_insns): New function.
3019 (s390_emit_prologue): New function.
3020 (s390_emit_epilogue): New function.
3021 (s390_emit_add): New function.
3022 (s390_emit_sub): New function.
3023 (s390_emit_mul): New function.
3024 (s390_emit_lsh): New function.
3025 (s390_emit_rsh_signed): New function.
3026 (s390_emit_rsh_unsigned): New function.
3027 (s390_emit_ext): New function.
3028 (s390_emit_log_not): New function.
3029 (s390_emit_bit_and): New function.
3030 (s390_emit_bit_or): New function.
3031 (s390_emit_bit_xor): New function.
3032 (s390_emit_bit_not): New function.
3033 (s390_emit_equal): New function.
3034 (s390_emit_less_signed): New function.
3035 (s390_emit_less_unsigned): New function.
3036 (s390_emit_ref): New function.
3037 (s390_emit_if_goto): New function.
3038 (s390_emit_goto): New function.
3039 (s390_write_goto_address): New function.
3040 (s390_emit_litpool): New function.
3041 (s390_emit_const): New function.
3042 (s390_emit_call): New function.
3043 (s390_emit_reg): New function.
3044 (s390_emit_pop): New function.
3045 (s390_emit_stack_flush): New function.
3046 (s390_emit_zero_ext): New function.
3047 (s390_emit_swap): New function.
3048 (s390_emit_stack_adjust): New function.
3049 (s390_emit_set_r2): New function.
3050 (s390_emit_int_call_1): New function.
3051 (s390_emit_void_call_2): New function.
3052 (s390_emit_eq_goto): New function.
3053 (s390_emit_ne_goto): New function.
3054 (s390_emit_lt_goto): New function.
3055 (s390_emit_le_goto): New function.
3056 (s390_emit_gt_goto): New function.
3057 (s390_emit_ge_goto): New function.
3058 (s390x_emit_prologue): New function.
3059 (s390x_emit_epilogue): New function.
3060 (s390x_emit_add): New function.
3061 (s390x_emit_sub): New function.
3062 (s390x_emit_mul): New function.
3063 (s390x_emit_lsh): New function.
3064 (s390x_emit_rsh_signed): New function.
3065 (s390x_emit_rsh_unsigned): New function.
3066 (s390x_emit_ext): New function.
3067 (s390x_emit_log_not): New function.
3068 (s390x_emit_bit_and): New function.
3069 (s390x_emit_bit_or): New function.
3070 (s390x_emit_bit_xor): New function.
3071 (s390x_emit_bit_not): New function.
3072 (s390x_emit_equal): New function.
3073 (s390x_emit_less_signed): New function.
3074 (s390x_emit_less_unsigned): New function.
3075 (s390x_emit_ref): New function.
3076 (s390x_emit_if_goto): New function.
3077 (s390x_emit_const): New function.
3078 (s390x_emit_call): New function.
3079 (s390x_emit_reg): New function.
3080 (s390x_emit_pop): New function.
3081 (s390x_emit_stack_flush): New function.
3082 (s390x_emit_zero_ext): New function.
3083 (s390x_emit_swap): New function.
3084 (s390x_emit_stack_adjust): New function.
3085 (s390x_emit_int_call_1): New function.
3086 (s390x_emit_void_call_2): New function.
3087 (s390x_emit_eq_goto): New function.
3088 (s390x_emit_ne_goto): New function.
3089 (s390x_emit_lt_goto): New function.
3090 (s390x_emit_le_goto): New function.
3091 (s390x_emit_gt_goto): New function.
3092 (s390x_emit_ge_goto): New function.
3093 (s390_emit_ops): New function.
3094 (struct linux_target_ops): Fill in emit_ops hook.
3095
abd9baf9
MK
30962016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3097
3098 PR 18377
3099 * Makefile.in: Add s390 IPA files.
3100 * configure.srv: Build IPA for s390.
3101 * linux-s390-ipa.c: New file.
3102 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3103 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3104 (tdesc_s390_linux32): Likewise.
3105 (init_registers_s390_linux32v1): Likewise.
3106 (tdesc_s390_linux32v1): Likewise.
3107 (init_registers_s390_linux32v2): Likewise.
3108 (tdesc_s390_linux32v2): Likewise.
3109 (init_registers_s390_linux64): Likewise.
3110 (tdesc_s390_linux64): Likewise.
3111 (init_registers_s390_linux64v1): Likewise.
3112 (tdesc_s390_linux64v1): Likewise.
3113 (init_registers_s390_linux64v2): Likewise.
3114 (tdesc_s390_linux64v2): Likewise.
3115 (init_registers_s390_te_linux64): Likewise.
3116 (tdesc_s390_te_linux64): Likewise.
3117 (init_registers_s390_vx_linux64): Likewise.
3118 (tdesc_s390_vx_linux64): Likewise.
3119 (init_registers_s390_tevx_linux64): Likewise.
3120 (tdesc_s390_tevx_linux64): Likewise.
3121 (init_registers_s390x_linux64): Likewise.
3122 (tdesc_s390x_linux64): Likewise.
3123 (init_registers_s390x_linux64v1): Likewise.
3124 (tdesc_s390x_linux64v1): Likewise.
3125 (init_registers_s390x_linux64v2): Likewise.
3126 (tdesc_s390x_linux64v2): Likewise.
3127 (init_registers_s390x_te_linux64): Likewise.
3128 (tdesc_s390x_te_linux64): Likewise.
3129 (init_registers_s390x_vx_linux64): Likewise.
3130 (tdesc_s390x_vx_linux64): Likewise.
3131 (init_registers_s390x_tevx_linux64): Likewise.
3132 (tdesc_s390x_tevx_linux64): Likewise.
3133 (have_hwcap_s390_vx): New static variable.
3134 (s390_arch_setup): Fill have_hwcap_s390_vx.
3135 (s390_get_thread_area): New function.
3136 (s390_ft_entry_gpr_esa): New const.
3137 (s390_ft_entry_gpr_zarch): New const.
3138 (s390_ft_entry_misc): New const.
3139 (s390_ft_entry_fr): New const.
3140 (s390_ft_entry_vr): New const.
3141 (s390_ft_main_31): New const.
3142 (s390_ft_main_64): New const.
3143 (s390_ft_exit_fr): New const.
3144 (s390_ft_exit_vr): New const.
3145 (s390_ft_exit_misc): New const.
3146 (s390_ft_exit_gpr_esa): New const.
3147 (s390_ft_exit_gpr_zarch): New const.
3148 (append_insns): New function.
3149 (s390_relocate_instruction): New function.
3150 (s390_install_fast_tracepoint_jump_pad): New function.
3151 (s390_get_min_fast_tracepoint_insn_len): New function.
3152 (s390_get_ipa_tdesc_idx): New function.
3153 (struct linux_target_ops): Wire in the above functions.
3154 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3155 * linux-s390-tdesc.h: New file.
3156
a4105d04
MK
31572016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3158
3159 * linux-s390-low.c (s390_supports_tracepoints): New function.
3160 (struct linux_target_ops): Fill supports_tracepoints hook.
3161
35ac8b3e
YQ
31622016-03-18 Yao Qi <yao.qi@linaro.org>
3163
3164 * linux-low.c (lwp_signal_can_be_delivered): New function.
3165 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3166
94610ec4
YQ
31672016-03-18 Yao Qi <yao.qi@linaro.org>
3168
3169 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3170 0 if signal is enqueued. Remove 'signal' from one debugging
3171 message. Move one debugging message to some lines below.
3172 Remove code setting 'signal' to 0.
3173
80aea927
YQ
31742016-03-18 Yao Qi <yao.qi@linaro.org>
3175
3176 * linux-low.c (linux_low_filter_event): Remove redundant
3177 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3178
b04fd3be
MK
31792016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3180
3181 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3182 (struct linux_target_ops): Wire in the above.
3183
c40c8d4b
YQ
31842016-03-03 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-low.c: Update comments to start_step_over.
3187
0f8288ae
YQ
31882016-03-03 Yao Qi <yao.qi@linaro.org>
3189
3190 PR server/19736
3191 * linux-low.c (handle_extended_wait): Set child suspended
3192 if event_lwp->bp_reinsert isn't zero.
3193
fdbd04a8
YQ
31942016-03-02 Yao Qi <yao.qi@linaro.org>
3195
3196 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3197 enqueue_pending_signal.
3198
6896a8fa
MK
31992016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3200
3201 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3202 is actually loaded.
3203
ab503087
MK
32042016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3205
3206 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3207 (s390_regmap_3264) [!__s390x__]: New global.
3208 (s390_collect_ptrace_register): Skip map entries containing -1.
3209 (s390_supply_ptrace_register): Ditto.
3210 (s390_fill_gprs_high): New function.
3211 (s390_store_gprs_high): New function.
3212 (s390_regsets): Add NT_S390_HIGH_GPRS.
3213 (s390_get_hwcap): Enable on 31-bit.
3214 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3215 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3216 Detect NT_S390_HIGH_GPRS.
3217 (s390_usrregs_info_3264): Enable on 31-bit.
3218 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3219 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3220
ae91f625
MK
32212016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3222
3223 PR gdb/13808
3224 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3225 * configure.srv: Ditto.
3226 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3227 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3228 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3229 (init_registers_amd64_linux): Remove prototype.
3230 (tdesc_amd64_linux): Remove declaration.
3231 (get_ipa_tdesc): New function.
3232 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3233 initialize remaining tdescs.
3234 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3235 (init_registers_i386_linux): Remove prototype.
3236 (tdesc_i386_linux): Remove declaration.
3237 (get_ipa_tdesc): New function.
3238 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3239 initialize remaining tdescs.
3240 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3241 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3242 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3243 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3244 (x86_get_ipa_tdesc_idx): New function.
3245 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3246 * linux-x86-tdesc.h: New file.
3247 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3248 (target_get_ipa_tdesc_idx): New macro.
3249 * tracepoint.c (ipa_tdesc_idx): New macro.
3250 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3251 (symbol_list): Add ipa_tdesc_idx.
3252 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3253 (ipa_tdesc): Remove.
3254 (ipa_tdesc_idx): New variable.
3255 (get_context_regcache): Use get_ipa_tdesc.
3256 (gdb_collect): Ditto.
3257 (gdb_probe): Ditto.
3258 * tracepoint.h (get_ipa_tdesc): New prototype.
3259 (ipa_tdesc): Remove.
3260
e7ad2f14
PA
32612016-02-24 Pedro Alves <palves@redhat.com>
3262
3263 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3264 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3265 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3266 Factor out common code between the USE_SIGTRAP_SIGINFO and
3267 !USE_SIGTRAP_SIGINFO blocks.
3268 (linux_low_filter_event): Call save_stop_reason instead of
3269 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3270 Update comments.
3271 (linux_wait_1): Update comments.
3272
657f9cde
WW
32732016-02-24 Wei-cheng Wang <cole945@gmail.com>
3274
3275 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3276 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3277 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3278 ppc_insert_point, ppc_remove_point.
3279
b00b61e1
MK
32802016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3281
3282 * linux-s390-low.c (s390_supports_z_point_type): New function.
3283 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3284
553cb527
YQ
32852016-02-16 Yao Qi <yao.qi@linaro.org>
3286
3287 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3288 PC. Get pc from regcache_read_pc.
3289
a5652c21
YQ
32902016-02-12 Yao Qi <yao.qi@linaro.org>
3291
3292 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3293 or linux_get_pc_32bit.
3294 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3295
ed443b61
YQ
32962016-02-12 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3299 arm_linux_get_next_pcs_fixup.
3300
020ecd38
MK
33012016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3302
3303 * tracepoint.c (x_tracepoint_action_download): Change
3304 write_inferior_data_ptr to write_inferior_data_pointer.
3305 (cmd_qtstart): Likewise.
3306 (write_inferior_data_ptr): Remove.
3307 (download_agent_expr): Change write_inferior_data_ptr to
3308 write_inferior_data_pointer.
3309 (download_tracepoint_1): Likewise.
3310 (download_tracepoint): Likewise.
3311 (download_trace_state_variables): Likewise.
3312
7cae9051
WW
33132016-02-11 Wei-cheng Wang <cole945@gmail.com>
3314 Marcin Kościelnicki <koriakin@0x04.net>
3315
3316 * tracepoint.c (struct tracepoint_action_ops): Remove.
3317 (struct tracepoint_action): Remove ops.
3318 (m_tracepoint_action_download, r_tracepoint_action_download)
3319 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3320 size and offset accordingly.
3321 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3322 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3323 (tracepoint_action_send, tracepoint_action_download): New functions.
3324 Helpers for trace action handlers.
3325 (add_tracepoint_action): Remove setup actions ops.
3326 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3327
9f6a71b4
YQ
33282016-02-10 Yao Qi <yao.qi@linaro.org>
3329
3330 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3331
1e94266c
SM
33322016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3333
3334 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3335 to AC_OUTPUT.
3336 * configure: Regenerate.
3337
8adce034
SM
33382016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3339
3340 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3341 void * to gdb_byte *.
3342 * linux-low.c (siginfo_fixup): Likewise.
3343 (linux_xfer_siginfo): Likewise.
3344 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3345 Likewise.
3346 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3347
93813b37
WT
33482016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3349
3350 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3351 to srv_tgtobj.
3352 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3353 to srv_tgtobj.
3354 * linux-x86-low.c [__x86_64__]: Include
3355 "nat/amd64-linux-siginfo.h".
3356 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3357 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3358 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3359 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3360 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3361 (cpt_si_fd, si_timerid, si_overrun): Move from
3362 nat/amd64-linux-siginfo.c.
3363 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3364
8424cc97
SM
33652016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3366
3367 * server.c (skip_to_semicolon): Remove.
3368 (process_point_options): Use strchrnul instead of
3369 skip_to_semicolon.
3370
4d18591b
YQ
33712016-01-26 Yao Qi <yao.qi@linaro.org>
3372
3373 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3374 * linux-low.c (install_software_single_step_breakpoints): Don't
3375 call regcache_read_pc.
3376 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3377 argument pc.
3378
d8020970
YQ
33792016-01-26 Yao Qi <yao.qi@linaro.org>
3380
3381 * linux-low.c (install_software_single_step_breakpoints): Call
3382 regcache_read_pc instead of get_pc.
3383
8b207339
YQ
33842016-01-26 Yao Qi <yao.qi@linaro.org>
3385
3386 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3387 (unblock_async_io): Rename to ...
3388 (block_unblock_async_io): ... it. New function.
3389 (enable_async_io): Don't install SIGIO handler. Unblock it
3390 instead.
3391 (disable_async_io): Don't ignore SIGIO. Block it instead.
3392 (initialize_async_io): Install SIGIO handler. Don't call
3393 unblock_async_io.
3394
18879fef
YQ
33952016-01-26 Yao Qi <yao.qi@linaro.org>
3396
3397 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3398 first character is '\003', call *the_target->request_interrupt.
3399
a0f8e08a
YQ
34002016-01-25 Yao Qi <yao.qi@linaro.org>
3401
3402 * remote-utils.c (new_thread_notify): Remove.
3403 (dead_thread_notify): Likewise.
3404 * remote-utils.h (new_thread_notify): Remove declaration.
3405 (dead_thread_notify): Likewise.
3406
cc5fd9ab
MK
34072016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3408
3409 * gdb.trace/pending.exp: Fix expected message on continue.
3410
99e8eb11
MK
34112016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3412
3413 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3414 it works properly on big-endian machines where sizeof (CORE_ADDR)
3415 != sizeof (void *).
3416
a994041d
PA
34172016-01-21 Pedro Alves <palves@redhat.com>
3418
3419 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3420 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3421 * configure: Regenerate.
3422
f7a6a40d
YQ
34232016-01-21 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3426 is_thumb and set it according to CPSR saved on the stack.
3427 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3428 arm_sigreturn_next_pc.
3429
6f69e520
YQ
34302016-01-18 Yao Qi <yao.qi@linaro.org>
3431
3432 * linux-low.c (linux_set_pc_64bit): New function.
3433 (linux_get_pc_64bit): New function.
3434 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3435 Declare.
3436 * linux-sparc-low.c (debug_threads): Remove declaration.
3437 (sparc_get_pc): Remove.
3438 (the_low_target): Use linux_get_pc_64bit instead of
3439 sparc_get_pc.
3440 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3441 (the_low_target): Use linux_get_pc_64bit and
3442 linux_set_pc_64bit.
3443
276d4552
YQ
34442016-01-18 Yao Qi <yao.qi@linaro.org>
3445
3446 * linux-arm-low.c (debug_threads): Remove declaration.
3447 (arm_get_pc, arm_set_pc): Remove.
3448 (the_low_target): Use linux_get_pc_32bit and
3449 linux_set_pc_32bit.
3450 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3451 (the_low_target): Use linux_get_pc_32bit and
3452 linux_set_pc_32bit.
3453 * linux-cris-low.c (debug_threads): Remove declaration.
3454 (cris_get_pc, cris_set_pc,): Remove.
3455 (the_low_target): Use linux_get_pc_32bit and
3456 linux_set_pc_32bit.
3457 * linux-crisv32-low.c (debug_threads): Remove declaration.
3458 (cris_get_pc, cris_set_pc): Remove.
3459 (the_low_target): Use linux_get_pc_32bit and
3460 linux_set_pc_32bit.
3461 * linux-low.c: Include inttypes.h.
3462 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3463 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3464 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3465 (the_low_target): Use linux_get_pc_32bit and
3466 linux_set_pc_32bit.
3467 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3468 (the_low_target): Use linux_get_pc_32bit and
3469 linux_set_pc_32bit.
3470 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3471 (the_low_target): Use linux_get_pc_32bit and
3472 linux_set_pc_32bit.
3473 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3474 (the_low_target): Use linux_get_pc_32bit and
3475 linux_set_pc_32bit.
3476 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3477 (the_low_target): Use linux_get_pc_32bit and
3478 linux_set_pc_32bit.
3479
eb0edac8
GB
34802016-01-18 Gary Benson <gbenson@redhat.com>
3481
3482 * configure.ac (AC_FUNC_FORK): New check.
3483 * config.in: Regenerate.
3484 * configure: Likewise.
3485
1b451dda
YQ
34862016-01-14 Yao Qi <yao.qi@linaro.org>
3487
3488 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3489 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3490 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3491 arm_get_next_pcs_ctor.
3492
82075af2
JS
34932016-01-12 Josh Stone <jistone@redhat.com>
3494 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3495
3496 * inferiors.h: Include "gdb_vecs.h".
3497 (struct process_info): Add syscalls_to_catch.
3498 * inferiors.c (remove_process): Free syscalls_to_catch.
3499 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3500 syscall_return stops.
3501 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3502 * server.c (handle_general_set): Handle QCatchSyscalls.
3503 (handle_query): Report support for QCatchSyscalls.
3504 * target.h (struct target_ops): Add supports_catch_syscall.
3505 (target_supports_catch_syscall): New macro.
3506 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3507 (struct lwp_info): Add syscall_state.
3508 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3509 Maintain syscall_state and syscalls_to_catch across exec.
3510 (get_syscall_trapinfo): New function, proxy to the_low_target.
3511 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3512 (linux_low_filter_event): Toggle syscall_state entry/return for
3513 syscall traps, and set it ignored for all others.
3514 (gdb_catching_syscalls_p): New function.
3515 (gdb_catch_this_syscall_p): New function.
3516 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3517 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3518 (linux_supports_catch_syscall): New function.
3519 (linux_target_ops): Install it.
3520 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3521 (the_low_target): Install it.
3522
8f13a3ce
MF
35232016-01-12 Mike Frysinger <vapier@gentoo.org>
3524
3525 * acinclude.m4: Include new ../warning.m4 file.
3526 * configure: Regenerated.
3527 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3528
5b3da067
MF
35292016-01-12 Mike Frysinger <vapier@gentoo.org>
3530
3531 * ax.c (is_goto_target): Mark static.
3532 * linux-low.c (register_addr): Likewise.
3533 (linux_fetch_registers, linux_store_registers): Likewise.
3534 * mem-break.c (any_persistent_commands): Fix old prototype.
3535 (add_commands_to_breakpoint): Mark static.
3536 * regcache.c (find_register_by_name): Delete unused func.
3537 * remote-utils.c (hex_or_minus_one): Mark static.
3538 * server.c (monitor_show_help): Mark static.
3539 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3540 handle_v_requests): Likewise.
3541
bc504a31
PA
35422016-01-12 Pedro Alves <palves@redhat.com>
3543
3544 Remove use of the registered trademark symbol throughout.
3545
5a0dd67a
YQ
35462016-01-08 Yao Qi <yao.qi@linaro.org>
3547
3548 * remote-utils.c (getpkt): If c is '\003', call target hook
3549 request_interrupt.
3550
b2ca446f
YQ
35512016-01-06 Yao Qi <yao.qi@linaro.org>
3552
3553 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3554 linux-aarch32-low.c.
3555 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3556 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3557 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3558 (thumb2_breakpoint): Declare.
3559 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3560 linux-aarch32-low.h.
3561 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3562 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3563 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3564
edd88788
JB
35652016-01-01 Joel Brobecker <brobecker@adacore.com>
3566
3567 * gdbreplay.c (gdbreplay_version): Change copyright year in
3568 version message.
3569 * server.c (gdbserver_version): Likewise.
3570
65da7f14
PP
35712015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3572
3573 * server.c (crc32_table): Delete.
3574 (crc32): Use libiberty's xcrc32 function.
3575
4abd5ed2
JB
35762015-12-22 Joel Brobecker <brobecker@adacore.com>
3577
3578 * lynx-low.c (lynx_delete_thread_callback): New function.
3579 (lynx_mourn): Properly delete our process and all of its
3580 threads. Remove call to clear_inferiors.
3581
0e50fe5c
JB
35822015-12-22 Joel Brobecker <brobecker@adacore.com>
3583
3584 * target.c (thread_search_callback): Add check that
3585 the thread_stopped target callback is not NULL before
3586 calling it.
3587
35adc03f
YQ
35882015-12-21 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3591 arm breakpoint.
3592
bd2b2909
AT
35932015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3594
3595 * server.c (handle_query): Call target_supports_software_single_step.
3596
7fe5e27e
AT
35972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3598
3599 * linux-low.c (single_step): New function.
3600 (linux_resume_one_lwp_throw): Call single_step.
3601 (start_step_over): Likewise.
3602
d9311bfa
AT
36032015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3604
3605 * Makefile.in (SFILES): Append arch/arm-linux.c,
3606 arch/arm-get-next-pcs.c.
3607 (arm-linux.o): New rule.
3608 (arm-get-next-pcs.o): New rule.
3609 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3610 arm-linux.o.
3611 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3612 to linux-aarch32-low.c.
3613 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3614 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3615 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3616 (thumb2_breakpoint_len): Likewise.
3617 (arm_is_thumb_mode): Make non-static.
3618 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3619 from linux-aarch32-low.c.
3620 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3621 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3622 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3623 (thumb2_breakpoint_len): Likewise.
3624 (arm_is_thumb_mode): New declaration.
3625 * linux-arm-low.c: Include arch/arm-linux.h
3626 aarch/arm-get-next-pcs.h, sys/syscall.h.
3627 (get_next_pcs_ops): New struct.
3628 (get_next_pcs_addr_bits_remove): New function.
3629 (get_next_pcs_is_thumb): New function.
3630 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3631 (arm_sigreturn_next_pc): Likewise.
3632 (get_next_pcs_syscall_next_pc): Likewise.
3633 (arm_gdbserver_get_next_pcs): Likewise.
3634 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3635 Initialize.
3636 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3637 * server.h: Include gdb_vecs.h.
3638
68ce2059
AT
36392015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3640
3641 * Makefile.in (SFILES): Append common/common-regcache.c.
3642 (OBS): Append common-regcache.o.
3643 (common-regcache.o): New rule.
3644 * regcache.c (init_register_cache): Initialize cache to
3645 REG_UNAVAILABLE.
3646 (regcache_raw_read_unsigned): New function.
3647 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3648 register_status enum.
3649
fa5308bd
AT
36502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3651
3652 * linux-aarch64-low.c (the_low_targets): Rename
3653 breakpoint_reinsert_addr to get_next_pcs.
3654 * linux-arm-low.c (the_low_targets): Likewise.
3655 * linux-bfin-low.c (the_low_targets): Likewise.
3656 * linux-cris-low.c (the_low_targets): Likewise.
3657 * linux-crisv32-low.c (the_low_targets): Likewise.
3658 * linux-low.c (can_software_single_step): Likewise.
3659 (install_software_single_step_breakpoints): New function.
3660 (start_step_over): Use install_software_single_step_breakpoints.
3661 * linux-low.h: New CORE_ADDR vector.
3662 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3663 get_next_pcs.
3664 * linux-mips-low.c (the_low_targets): Likewise.
3665 * linux-nios2-low.c (the_low_targets): Likewise.
3666 * linux-sparc-low.c (the_low_targets): Likewise.
3667
4a6ed09b
PA
36682015-12-17 Pedro Alves <palves@redhat.com>
3669
3670 * linux-low.c (linux_kill_one_lwp): Remove references to
3671 LinuxThreads.
3672 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3673 to 'kill'.
3674 (linux_init_signals): Delete.
3675 (initialize_low): Adjust.
3676 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3677
7544db95
PA
36782015-12-16 Pedro Alves <palves@redhat.com>
3679
3680 * configure.ac (compiler warning flags): When testing a
3681 -Wno-foo option, check whether -Wfoo works instead.
3682 * configure: Regenerate.
3683
8020350c
DB
36842015-12-11 Don Breazeal <donb@codesourcery.com>
3685
3686 * server.c (process_serial_event): Don't exit from gdbserver
3687 in remote mode if there are still active inferiors.
3688
db91f502
YQ
36892015-12-11 Yao Qi <yao.qi@linaro.org>
3690
3691 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3692 arm_breakpoint_at if the process is 32-bit.
3693
b37a6290
YQ
36942015-12-11 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3697 arm breakpoint.
3698
17b1509a
YQ
36992015-12-07 Yao Qi <yao.qi@linaro.org>
3700
3701 * configure.srv: Append arm.o to srv_tgtobj for
3702 aarch64*-*-linux* target.
3703 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3704 from linux-arm-low.c.
3705 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3706 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3707 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3708 (thumb2_breakpoint_len): Likewise.
3709 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3710 (arm_breakpoint_kinds): Likewise.
3711 (arm_breakpoint_kind_from_pc): Likewise.
3712 (arm_sw_breakpoint_from_kind): Likewise.
3713 (arm_breakpoint_kind_from_current_state): Likewise.
3714 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3715 (arm_sw_breakpoint_from_kind): Declare.
3716 (arm_breakpoint_kind_from_current_state): Declare.
3717 (arm_breakpoint_at): Declare.
3718 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3719 arm_sw_breakpoint_from_kind if process is 32-bit.
3720 (aarch64_breakpoint_kind_from_pc): New function.
3721 (aarch64_breakpoint_kind_from_current_state): New function.
3722 (the_low_target): Initialize fields breakpoint_kind_from_pc
3723 and breakpoint_kind_from_current_state.
3724 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3725 linux-aarch32-low.c.
3726 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3727 (arm_breakpoint, arm_breakpoint_len): Likewise.
3728 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3729 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3730 (arm_is_thumb_mode): Likewise.
3731 (arm_breakpoint_at): Likewise.
3732 (arm_breakpoint_kind_from_pc): Likewise.
3733 (arm_sw_breakpoint_from_kind): Likewise.
3734 (arm_breakpoint_kind_from_current_state): Likewise.
3735
3736 Revert:
3737 2015-08-04 Yao Qi <yao.qi@linaro.org>
3738
3739 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3740 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3741 * server.c (extended_protocol): Remove "static".
3742 * server.h (extended_protocol): Declare it.
3743
ece66d65
JS
37442015-12-04 Josh Stone <jistone@redhat.com>
3745
3746 * target.h (struct target_ops) <arch_setup>: Rename to ...
3747 (struct target_ops) <post_create_inferior>: ... this.
3748 (target_arch_setup): Rename to ...
3749 (target_post_create_inferior): ... this, calling post_create_inferior.
3750 * server.c (start_inferior): Update target_arch_setup calls to
3751 target_post_create_inferior.
3752 * linux-low.c (linux_low_ptrace_options): Forward declare.
3753 (linux_arch_setup): Update its comment for general use.
3754 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3755 (struct linux_target_ops): Use linux_post_create_inferior.
3756 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3757 to post_create_inferior.
3758 * nto-low.c (struct nto_target_ops): Likewise.
3759 * spu-low.c (struct spu_target_ops): Likewise.
3760 * win32-low.c (struct win32_target_ops): Likewise.
3761
e58c48b4
AT
37622015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3763
3764 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3765
fbec8956
AT
37662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3767
3768 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3769 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3770 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3771 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3772 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3773 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3774 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3775 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3776 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3777 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3778 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3779 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3780
9b4c5f87
AT
37812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3782
3783 * linux-low.c (linux_look_up_symbols): Don't call
3784 linux_supports_traceclone.
3785 * linux-low.h (thread_db_init): Remove use_events argument.
3786 * thread-db.c (thread_db_use_event): Remove global variable.
3787 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3788 (struct thread_db) <td_create_bp>: Remove field.
3789 (thread_db_create_event): Remove function.
3790 (thread_db_enable_reporting): Likewise.
3791 (find_one_thread): Don't check for thread_db_use_events.
3792 (attach_thread): Likewise.
3793 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3794 (try_thread_db_load_1): Don't check for thread_db_use_events.
3795 (thread_db_init): Remove use_events argument and thread events
3796 handling.
3797 (remove_thread_event_breakpoints): Remove function.
3798 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3799
7d00775e
AT
38002015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3801
3802 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3803 New function.
3804 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3805 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3806 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3807 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3808 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3809 Initialize.
3810 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3811 New function.
3812 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3813 * linux-low.c (can_hardware_single_step): Use
3814 supports_hardware_single_step.
3815 (can_software_single_step): New function.
3816 (start_step_over): Call can_software_single_step.
3817 (linux_supports_hardware_single_step): New function.
3818 (struct target_ops) <supports_software_single_step>: Initialize.
3819 * linux-low.h (struct linux_target_ops)
3820 <supports_hardware_single_step>: Initialize.
3821 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3822 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3823 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3824 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3825 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3826 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3827 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3829 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3830 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3831 Initialize.
3832 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3833 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3834 Initialize.
3835 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3836 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3837 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3838 New function.
3839 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3840 * target.h (struct target_ops): <supports_software_single_step>:
3841 New field.
3842 (target_supports_software_single_step): New macro.
3843
2d97cd35
AT
38442015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3845
3846 * linux-low.c (linux_wait_1): Fix pc advance condition.
3847 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3848 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3849
769ef81f
AT
38502015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3851
3852 * linux-arm-low.c (arm_is_thumb_mode): New function.
3853 (arm_breakpoint_at): Use arm_is_thumb_mode.
3854 (arm_breakpoint_kind_from_current_state): New function.
3855 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3856 Initialize.
3857 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3858 (linux_breakpoint_kind_from_current_state): New function.
3859 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3860 * linux-low.h (struct linux_target_ops)
3861 <breakpoint_kind_from_current_state>: New field.
3862 * target.h (struct target_ops): Likewise.
3863 (target_breakpoint_kind_from_current_state): New macro.
3864
1bebeeca
PA
38652015-11-30 Pedro Alves <palves@redhat.com>
3866
3867 * linux-low.c (linux_resume): Wake up the event loop before
3868 returning.
3869
a67a9fae
PA
38702015-11-30 Pedro Alves <palves@redhat.com>
3871
3872 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3873 check.
3874 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3875 to -1.
3876 * target.c (struct thread_search): New structure.
3877 (thread_search_callback): New function.
3878 (prev_general_thread): New global.
3879 (prepare_to_access_memory, done_accessing_memory): New functions.
3880 * target.h (prepare_to_access_memory, done_accessing_memory):
3881 Replace macros with function declarations.
3882
f2faf941
PA
38832015-11-30 Pedro Alves <palves@redhat.com>
3884
3885 PR 14618
3886 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3887 report TARGET_WAITKIND_NO_RESUMED.
3888 * remote-utils.c (prepare_resume_reply): Handle
3889 TARGET_WAITKIND_NO_RESUMED.
3890 * server.c (report_no_resumed): New global.
3891 (handle_query) <qSupported>: Handle "no-resumed+". Report
3892 "no-resumed+" support.
3893 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3894 return error if the client doesn't support no-resumed events.
3895 (push_stop_notification): New function.
3896 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3897 events if the client supports them.
3898
a681f9c9
PA
38992015-11-30 Pedro Alves <palves@redhat.com>
3900
3901 * linux-low.c (thread_still_has_status_pending_p): Don't check
3902 vCont;t here.
3903 (lwp_resumed): New function.
3904 (status_pending_p_callback): Return early if the LWP is not
3905 supposed to be resumed.
3906
65706a29
PA
39072015-11-30 Pedro Alves <palves@redhat.com>
3908
3909 * linux-low.c (handle_extended_wait): Assert that the LWP's
3910 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3911 thread create events, leave the new child's status pending.
3912 (linux_low_filter_event): If GDB wants to hear about thread exit
3913 events, leave the LWP marked dead and don't delete it.
3914 (linux_wait_for_event_filtered): Don't check for thread exit.
3915 (filter_exit_event): New function.
3916 (linux_wait_1): Use it, when returning an exit event.
3917 (linux_resume_one_lwp_throw): Assert that the LWP's
3918 waitstatus is TARGET_WAITKIND_IGNORE.
3919 * remote-utils.c (prepare_resume_reply): Handle
3920 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3921 * server.c (report_thread_events): New global.
3922 (handle_general_set): Handle QThreadEvents.
3923 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3924 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3925 TARGET_WAITKIND_THREAD_EXITED.
3926 * server.h (report_thread_events): Declare.
3927
56cf4bed
PA
39282015-11-30 Pedro Alves <palves@redhat.com>
3929
3930 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3931 the thread's last_resume_kind was resume_stop.
3932
500c1d85
PA
39332015-11-30 Pedro Alves <palves@redhat.com>
3934
3935 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3936 before returning.
3937
de979965
PA
39382015-11-30 Pedro Alves <palves@redhat.com>
3939
3940 * server.c (handle_v_requests): Handle vCtrlC.
3941
34c65914
PA
39422015-11-30 Pedro Alves <palves@redhat.com>
3943
3944 * gdbthread.h (find_any_thread_of_pid): Declare.
3945 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3946 functions.
3947 * server.c (handle_query): If current_thread is NULL, look for
3948 another thread of the selected process.
3949
79efa585 39502015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3951 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3952
3953 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3954 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3955 name in reply.
3956 * target.h (struct target_ops) <thread_name>: New field.
3957 (target_thread_name): New macro.
3958
80d82c19
JB
39592015-11-23 Joel Brobecker <brobecker@adacore.com>
3960
3961 * regcache.h (regcache_invalidate_pid): Add declaration.
3962 * regcache.c (regcache_invalidate_pid): New function, extracted
3963 from regcache_invalidate.
3964 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3965 Add trivial documentation comment.
3966 * lynx-low.c: Use regcache_invalidate_pid instead of
3967 regcache_invalidate.
3968
64da5dd5
JB
39692015-11-23 Joel Brobecker <brobecker@adacore.com>
3970
3971 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3972 and Elf64_auxv_t if the target is Android.
3973
37ce4055
DE
39742015-11-22 Doug Evans <xdje42@gmail.com>
3975
3976 * target.h: #include <sys/types.h>.
3977
06e03fff
PA
39782015-11-19 Pedro Alves <palves@redhat.com>
3979
3980 * linux-low.c (linux_process_qsupported): Change prototype.
3981 Adjust.
3982 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3983 Change prototype.
3984 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3985 and adjust to loop over all features.
3986 * server.c (handle_query) <qSupported>: Adjust to call
3987 target_process_qsupported once, passing it a vector of unprocessed
3988 features.
3989 * target.h (struct target_ops) <process_qsupported>: Change
3990 prototype.
3991 (target_process_qsupported): Adjust.
3992
9a084706
PA
39932015-11-19 Pedro Alves <palves@redhat.com>
3994
3995 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3996 mode.
3997 * configure: Regenerate.
3998
dad44a1f
PA
39992015-11-19 Pedro Alves <palves@redhat.com>
4000
4001 * configure: Regenerate.
4002
231c0592
YQ
40032015-11-19 Yao Qi <yao.qi@linaro.org>
4004
4005 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4006 type to uint32_t.
4007
6c1c9a8b
YQ
40082015-11-19 Yao Qi <yao.qi@linaro.org>
4009
4010 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4011 (struct aarch64_operand): Move enum out.
4012
9caa3311
YQ
40132015-11-19 Yao Qi <yao.qi@linaro.org>
4014
4015 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4016 struct user_fpsimd_state *.
4017 (aarch64_store_fpregset): Likewise.
4018
6a69a054
YQ
40192015-11-19 Yao Qi <yao.qi@linaro.org>
4020
4021 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4022 struct user_pt_regs *.
4023 (aarch64_store_gregset): Likewise.
4024
1798301e
PA
40252015-11-18 Pedro Alves <palves@redhat.com>
4026
4027 * Makefile.in (all_object_files): Add $IPA_OBJS.
4028
ce7715e2
PA
40292015-11-17 Pedro Alves <palves@redhat.com>
4030
4031 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4032 GDB_SIGNAL_0 and gdb_signal_to_string.
4033
c0879059
PA
40342015-11-17 Pedro Alves <palves@redhat.com>
4035
4036 * win32-low.c (handle_output_debug_string): Remove parameter.
4037 (win32_kill): Remove our_status local and adjust call to
4038 handle_output_debug_string.
4039 (get_child_debug_event): Adjust call to
4040 handle_output_debug_string.
4041
1996e237
SM
40422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4043
4044 * linux-mips-low.c (mips_fill_gregset): Add cast.
4045 (mips_store_gregset): Likewise.
4046 (mips_fill_fpregset): Likewise.
4047 (mips_store_fpregset): Likewise.
4048
cbec665b
SM
40492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4050
4051 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4052 priv.
4053
eb3e3c67
SM
40542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4055
4056 * linux-mips-low.c (mips_linux_new_thread): Change type of
4057 watch_type to enum target_hw_bp_type.
4058
171de4b8
SM
40592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4060
4061 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4062 Change return type to arm_hwbp_type.
4063
04248ead
SM
40642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4065
4066 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4067 (arm_store_gregset): Likewise.
4068 * linux-arm-low.c (arm_get_hwcap): Likewise.
4069 (arm_read_description): Likewise.
4070
04b3479c
SM
40712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4072
4073 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4074
2bc84e8a
SM
40752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4076
4077 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4078 (ppc_fill_vsxregset): Likewise.
4079 (ppc_store_vsxregset): Likewise.
4080 (ppc_fill_vrregset): Likewise.
4081 (ppc_store_vrregset): Likewise.
4082 (ppc_fill_evrregset): Likewise.
4083 (ppc_store_evrregset): Likewise.
4084
e6c5bb05
SM
40852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4086
4087 * linux-ppc-low.c (ppc_usrregs_info): Remove
4088 forward-declaration.
4089 (ppc_arch_setup): Move lower in file.
4090
7ea45d72
SM
40912015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4094 (ps_pdwrite): Likewise.
4095
69291610
HW
40962015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4097
4098 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4099 to after assert checks.
4100
b42945fd
SM
41012015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4102
4103 * proc-service.c (ps_pdread): Add/adjust casts.
4104 (ps_pdwrite): Add/adjust casts.
4105
d6f85c84
SM
41062015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4107
4108 * server.c (handle_search_memory_1): Cast return value of
4109 memmem.
4110
f98cd059
SM
41112015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4112
4113 * server.c (write_qxfer_response): Change type of data to
4114 gdb_byte *.
4115
d2412fa5
PA
41162015-10-29 Pedro Alves <palves@redhat.com>
4117
4118 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4119
c17414a2
PA
41202015-10-29 Pedro Alves <palves@redhat.com>
4121
4122 * tracepoint.c (clear_installed_tracepoints): Add casts.
4123
e053fbc4
PA
41242015-10-29 Pedro Alves <palves@redhat.com>
4125
4126 * server.c (handle_v_cont, process_serial_event): Add enum
4127 gdb_signal casts to signal parsing code.
4128
add67df8
PA
41292015-10-29 Pedro Alves <palves@redhat.com>
4130
4131 * linux-low.h (NULL_REGSET): Define.
4132 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4133 * linux-arm-low.c (arm_regsets): Likewise.
4134 * linux-crisv32-low.c (cris_regsets): Likewise.
4135 * linux-m68k-low.c (m68k_regsets): Likewise.
4136 * linux-mips-low.c (mips_regsets): Likewise.
4137 * linux-nios2-low.c (nios2_regsets): Likewise.
4138 * linux-ppc-low.c (ppc_regsets): Likewise.
4139 * linux-s390-low.c (s390_regsets): Likewise.
4140 * linux-sh-low.c (sh_regsets): Likewise.
4141 * linux-sparc-low.c (sparc_regsets): Likewise.
4142 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4143 * linux-tile-low.c (tile_regsets): Likewise.
4144 * linux-x86-low.c (x86_regsets): Likewise.
4145 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4146
50bc912a
PA
41472015-10-29 Pedro Alves <palves@redhat.com>
4148
4149 * linux-low.h (NULL_REGSET): Define.
4150 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4151 * linux-arm-low.c (arm_regsets): Likewise.
4152 * linux-crisv32-low.c (cris_regsets): Likewise.
4153 * linux-m68k-low.c (m68k_regsets): Likewise.
4154 * linux-mips-low.c (mips_regsets): Likewise.
4155 * linux-nios2-low.c (nios2_regsets): Likewise.
4156 * linux-ppc-low.c (ppc_regsets): Likewise.
4157 * linux-s390-low.c (s390_regsets): Likewise.
4158 * linux-sh-low.c (sh_regsets): Likewise.
4159 * linux-sparc-low.c (sparc_regsets): Likewise.
4160 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4161 * linux-tile-low.c (tile_regsets): Likewise.
4162 * linux-x86-low.c (x86_regsets): Likewise.
4163 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4164
682b2546
DE
41652015-10-26 Doug Evans <dje@google.com>
4166
4167 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4168
963843d4
DE
41692015-10-26 Doug Evans <dje@google.com>
4170
4171 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4172
d41401ac
DE
41732015-10-26 Doug Evans <dje@google.com>
4174
4175 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4176 for debug_printf.
4177 (attach_thread, find_new_threads_callback): Ditto.
4178
3db28855
AT
41792015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4180
4181 * mem-break.h (set_breakpoint_data): Remove.
4182
fb78e89c
AT
41832015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4184
4185 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4186 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4187 (initialize_low): Remove set_breakpoint_data call.
4188 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4189 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4190 (initialize_low): Remove set_breakpoint_data call.
4191 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4192 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4193 (initialize_low): Remove set_breakpoint_data call.
4194
2e6ee069
AT
41952015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4196
4197 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4198 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4199 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4200 * target.h (target_breakpoint_kind_from_pc): New macro.
4201
1652a986
AT
42022015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4203
4204 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4205 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4206 the default breakpoint kind.
4207
abeead09
AT
42082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4209
4210 * linux-arm-low.c (arm_supports_z_point_type): Add software
4211 breakpoint support.
4212
b0b4b501
AT
42132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4214
4215 * linux-arm-low.c: Refactor breakpoint definitions.
4216 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4217 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4218
8689682c
AT
42192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4220
4221 * Makefile.in: Add arm.c/o.
4222 * configure.srv: Likewise.
4223 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4224 (arm_breakpoint_kind_from_pc): New function.
4225 (arm_sw_breakpoint_from_kind): Return proper kind.
4226 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4227
27165294
AT
42282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4229
4230 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4231 removal.
4232 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4233 (struct raw_breakpoint) <size>: Remove.
4234 (struct raw_breakpoint) <kind>: Add.
4235 (bp_size): New function.
4236 (bp_opcode): Likewise.
4237 (find_raw_breakpoint_at): Adjust for kind.
4238 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4239 (remove_memory_breakpoint): Adjust for kind call bp_size.
4240 (set_raw_breakpoint_at): Adjust for kind.
4241 (set_breakpoint): Likewise.
4242 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4243 (delete_raw_breakpoint): Adjust for kind.
4244 (delete_breakpoint): Likewise.
4245 (find_gdb_breakpoint): Likewise.
4246 (set_gdb_breakpoint_1): Likewise.
4247 (set_gdb_breakpoint): Likewise.
4248 (delete_gdb_breakpoint_1): Likewise.
4249 (delete_gdb_breakpoint): Likewise.
4250 (uninsert_raw_breakpoint): Likewise.
4251 (reinsert_raw_breakpoint): Likewise.
4252 (set_breakpoint_data): Remove.
4253 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4254 (check_mem_read): Adjust for kind call bp_size.
4255 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4256 (clone_one_breakpoint): Adjust for kind.
4257 * mem-break.h (set_gdb_breakpoint): Likewise.
4258 (delete_gdb_breakpoint): Likewise.
4259 * server.c (process_serial_event): Likewise.
4260
dd373349
AT
42612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4262
4263 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4264 (struct linux_target_ops) <breakpoint>: Remove.
4265 (struct linux_target_ops) <breakpoint_len>: Remove.
4266 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4267 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4268 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4269 (arm_sw_breakpoint_from_kind): New function.
4270 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4271 (struct linux_target_ops) <breakpoint>: Remove.
4272 (struct linux_target_ops) <breakpoint_len>: Remove.
4273 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4274 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4275 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4276 (struct linux_target_ops) <breakpoint>: Remove.
4277 (struct linux_target_ops) <breakpoint_len>: Remove.
4278 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4279 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4280 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4281 (struct linux_target_ops) <breakpoint>: Remove.
4282 (struct linux_target_ops) <breakpoint_len>: Remove.
4283 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4284 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4285 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4286 and sw_breakpoint_from_kind to increment the pc.
4287 (linux_breakpoint_kind_from_pc): New function.
4288 (linux_sw_breakpoint_from_kind): New function.
4289 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4290 (initialize_low): Call breakpoint_kind_from_pc and
4291 sw_breakpoint_from_kind to replace breakpoint_data/len.
4292 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4293 New field.
4294 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4295 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4296 (struct linux_target_ops) <breakpoint>: Remove.
4297 (struct linux_target_ops) <breakpoint_len>: Remove.
4298 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4299 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4300 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4301 (struct linux_target_ops) <breakpoint>: Remove.
4302 (struct linux_target_ops) <breakpoint_len>: Remove.
4303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4305 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4306 (struct linux_target_ops) <breakpoint>: Remove.
4307 (struct linux_target_ops) <breakpoint_len>: Remove.
4308 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4310 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4311 (struct linux_target_ops) <breakpoint>: Remove.
4312 (struct linux_target_ops) <breakpoint_len>: Remove.
4313 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4314 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4315 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4316 (struct linux_target_ops) <breakpoint>: Remove.
4317 (struct linux_target_ops) <breakpoint_len>: Remove.
4318 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4320 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4321 (struct linux_target_ops) <breakpoint>: Remove.
4322 (struct linux_target_ops) <breakpoint_len>: Remove.
4323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4325 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4326 (struct linux_target_ops) <breakpoint>: Remove.
4327 (struct linux_target_ops) <breakpoint_len>: Remove.
4328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4330 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4331 (struct linux_target_ops) <breakpoint>: Remove.
4332 (struct linux_target_ops) <breakpoint_len>: Remove.
4333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4335 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4336 (struct linux_target_ops) <breakpoint>: Remove.
4337 (struct linux_target_ops) <breakpoint_len>: Remove.
4338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4340 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4341 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4342 (struct linux_target_ops) <breakpoint>: Remove.
4343 (struct linux_target_ops) <breakpoint_len>: Remove.
4344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4346 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4347 (struct linux_target_ops) <breakpoint>: Remove.
4348 (struct linux_target_ops) <breakpoint_len>: Remove.
4349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4351
4cd98a19
AT
43522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4353
4354 * linux-cris-low.c (cris_get_pc): Remove void arg.
4355
774ee6d2
AR
43562015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4357
4358 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4359 variable name.
4360
833dcd29
AR
43612015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4362
4363 * inferiors.c (thread_pid_matches_callback): New function.
4364 (find_thread_process): New function.
4365 (remove_thread): Reset current_thread.
4366 (remove_process): Assert threads have been removed first.
4367
8d689ee5
YQ
43682015-10-15 Yao Qi <yao.qi@linaro.org>
4369
4370 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4371 if it is 3.
4372 (aarch64_remove_point): Likewise.
4373 * regcache.c (regcache_register_size): New function.
4374
1c2e1515
YQ
43752015-10-12 Yao Qi <yao.qi@linaro.org>
4376
4377 * linux-aarch64-low.c: Update all callers as emit_load_store
4378 is renamed to aarch64_emit_load_store.
4379
e1c587c3
YQ
43802015-10-12 Yao Qi <yao.qi@linaro.org>
4381
4382 * linux-aarch64-low.c: Update all callers of function renaming
4383 from emit_insn to aarch64_emit_insn.
4384
b6542f81
YQ
43852015-10-12 Yao Qi <yao.qi@linaro.org>
4386
4387 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4388 arch/aarch64-insn.h.
4389 (struct aarch64_memory_operand): Likewise.
4390 (ENCODE): Likewise.
4391 (emit_insn): Move to arch/aarch64-insn.c.
4392 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4393 (emit_load_store): Move to arch/aarch64-insn.c.
4394 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4395 (can_encode_int32): Remove.
4396
246994ce
YQ
43972015-10-12 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4400 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4401 (aarch64_relocate_instruction): Likewise.
4402 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4403 (struct aarch64_insn_visitor): Likewise.
4404
0badd99f
YQ
44052015-10-12 Yao Qi <yao.qi@linaro.org>
4406
4407 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4408 (struct aarch64_insn_visitor): New.
4409 (struct aarch64_insn_relocation_data): New.
4410 (aarch64_ftrace_insn_reloc_b): New function.
4411 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4412 (aarch64_ftrace_insn_reloc_cb): Likewise.
4413 (aarch64_ftrace_insn_reloc_tb): Likewise.
4414 (aarch64_ftrace_insn_reloc_adr): Likewise.
4415 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4416 (aarch64_ftrace_insn_reloc_others): Likewise.
4417 (visitor): New.
4418 (aarch64_relocate_instruction): Use visitor.
4419
dfaffe9d
YQ
44202015-10-12 Yao Qi <yao.qi@linaro.org>
4421
4422 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4423 int. Add argument buf.
4424 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4425 aarch64_relocate_instruction.
4426
70b439f0
YQ
44272015-10-12 Yao Qi <yao.qi@linaro.org>
4428
4429 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4430 argument insn. Remove local variable insn. Don't call
4431 target_read_uint32.
4432 (aarch64_install_fast_tracepoint_jump_pad): Call
4433 target_read_uint32.
4434
7781c06f
YQ
44352015-09-30 Yao Qi <yao.qi@linaro.org>
4436
4437 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4438 (emit_load_store_pair): Likewise.
4439
9a3c8263
SM
44402015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4441
4442 * dll.c (match_dll): Add cast(s).
4443 (unloaded_dll): Likewise.
4444 * linux-low.c (second_thread_of_pid_p): Likewise.
4445 (delete_lwp_callback): Likewise.
4446 (count_events_callback): Likewise.
4447 (select_event_lwp_callback): Likewise.
4448 (linux_set_resume_request): Likewise.
4449 * server.c (accumulate_file_name_length): Likewise.
4450 (emit_dll_description): Likewise.
4451 (handle_qxfer_threads_worker): Likewise.
4452 (visit_actioned_threads): Likewise.
4453 * thread-db.c (any_thread_of): Likewise.
4454 * tracepoint.c (same_process_p): Likewise.
4455 (match_blocktype): Likewise.
4456 (build_traceframe_info_xml): Likewise.
4457
224c3ddb
SM
44582015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4459
4460 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4461 assignment.
4462 (gdb_unparse_agent_expr): Likewise.
4463 * hostio.c (require_data): Likewise.
4464 (handle_pread): Likewise.
4465 * linux-low.c (disable_regset): Likewise.
4466 (fetch_register): Likewise.
4467 (store_register): Likewise.
4468 (get_dynamic): Likewise.
4469 (linux_qxfer_libraries_svr4): Likewise.
4470 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4471 (set_fast_tracepoint_jump): Likewise.
4472 (uninsert_fast_tracepoint_jumps_at): Likewise.
4473 (reinsert_fast_tracepoint_jumps_at): Likewise.
4474 (validate_inserted_breakpoint): Likewise.
4475 (clone_agent_expr): Likewise.
4476 * regcache.c (init_register_cache): Likewise.
4477 * remote-utils.c (putpkt_binary_1): Likewise.
4478 (decode_M_packet): Likewise.
4479 (decode_X_packet): Likewise.
4480 (look_up_one_symbol): Likewise.
4481 (relocate_instruction): Likewise.
4482 (monitor_output): Likewise.
4483 * server.c (handle_search_memory): Likewise.
4484 (handle_qxfer_exec_file): Likewise.
4485 (handle_qxfer_libraries): Likewise.
4486 (handle_qxfer): Likewise.
4487 (handle_query): Likewise.
4488 (handle_v_cont): Likewise.
4489 (handle_v_run): Likewise.
4490 (captured_main): Likewise.
4491 * target.c (write_inferior_memory): Likewise.
4492 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4493 * tracepoint.c (init_trace_buffer): Likewise.
4494 (add_tracepoint_action): Likewise.
4495 (add_traceframe): Likewise.
4496 (add_traceframe_block): Likewise.
4497 (cmd_qtdpsrc): Likewise.
4498 (cmd_qtdv): Likewise.
4499 (cmd_qtstatus): Likewise.
4500 (response_source): Likewise.
4501 (response_tsv): Likewise.
4502 (cmd_qtnotes): Likewise.
4503 (gdb_collect): Likewise.
4504 (initialize_tracepoint): Likewise.
4505
afbe19f8
PL
45062015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4507
4508 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4509 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4510 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4511 <NOP>: New.
4512 (enum aarch64_condition_codes): New enum.
4513 (w0): New static global.
4514 (fp): Likewise.
4515 (lr): Likewise.
4516 (struct aarch64_memory_operand) <type>: New
4517 MEMORY_OPERAND_POSTINDEX type.
4518 (postindex_memory_operand): New helper function.
4519 (emit_ret): New function.
4520 (emit_load_store_pair): New function, factored out of emit_stp
4521 with support for MEMORY_OPERAND_POSTINDEX.
4522 (emit_stp): Rewrite using emit_load_store_pair.
4523 (emit_ldp): New function.
4524 (emit_load_store): Likewise.
4525 (emit_ldr): Mention post-index instruction in comment.
4526 (emit_ldrh): New function.
4527 (emit_ldrb): New function.
4528 (emit_ldrsw): Mention post-index instruction in comment.
4529 (emit_str): Likewise.
4530 (emit_subs): New function.
4531 (emit_cmp): Likewise.
4532 (emit_and): Likewise.
4533 (emit_orr): Likewise.
4534 (emit_orn): Likewise.
4535 (emit_eor): Likewise.
4536 (emit_mvn): Likewise.
4537 (emit_lslv): Likewise.
4538 (emit_lsrv): Likewise.
4539 (emit_asrv): Likewise.
4540 (emit_mul): Likewise.
4541 (emit_sbfm): Likewise.
4542 (emit_sbfx): Likewise.
4543 (emit_ubfm): Likewise.
4544 (emit_ubfx): Likewise.
4545 (emit_csinc): Likewise.
4546 (emit_cset): Likewise.
4547 (emit_nop): Likewise.
4548 (emit_ops_insns): New helper function.
4549 (emit_pop): Likewise.
4550 (emit_push): Likewise.
4551 (aarch64_emit_prologue): New function.
4552 (aarch64_emit_epilogue): Likewise.
4553 (aarch64_emit_add): Likewise.
4554 (aarch64_emit_sub): Likewise.
4555 (aarch64_emit_mul): Likewise.
4556 (aarch64_emit_lsh): Likewise.
4557 (aarch64_emit_rsh_signed): Likewise.
4558 (aarch64_emit_rsh_unsigned): Likewise.
4559 (aarch64_emit_ext): Likewise.
4560 (aarch64_emit_log_not): Likewise.
4561 (aarch64_emit_bit_and): Likewise.
4562 (aarch64_emit_bit_or): Likewise.
4563 (aarch64_emit_bit_xor): Likewise.
4564 (aarch64_emit_bit_not): Likewise.
4565 (aarch64_emit_equal): Likewise.
4566 (aarch64_emit_less_signed): Likewise.
4567 (aarch64_emit_less_unsigned): Likewise.
4568 (aarch64_emit_ref): Likewise.
4569 (aarch64_emit_if_goto): Likewise.
4570 (aarch64_emit_goto): Likewise.
4571 (aarch64_write_goto_address): Likewise.
4572 (aarch64_emit_const): Likewise.
4573 (aarch64_emit_call): Likewise.
4574 (aarch64_emit_reg): Likewise.
4575 (aarch64_emit_pop): Likewise.
4576 (aarch64_emit_stack_flush): Likewise.
4577 (aarch64_emit_zero_ext): Likewise.
4578 (aarch64_emit_swap): Likewise.
4579 (aarch64_emit_stack_adjust): Likewise.
4580 (aarch64_emit_int_call_1): Likewise.
4581 (aarch64_emit_void_call_2): Likewise.
4582 (aarch64_emit_eq_goto): Likewise.
4583 (aarch64_emit_ne_goto): Likewise.
4584 (aarch64_emit_lt_goto): Likewise.
4585 (aarch64_emit_le_goto): Likewise.
4586 (aarch64_emit_gt_goto): Likewise.
4587 (aarch64_emit_ge_got): Likewise.
4588 (aarch64_emit_ops_impl): New static global variable.
4589 (aarch64_emit_ops): New target function, return
4590 &aarch64_emit_ops_impl.
4591 (struct linux_target_ops): Install it.
4592
bb903df0
PL
45932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4594
4595 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4596 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4597 aarch64-ipa.o.
4598 * linux-aarch64-ipa.c: New file.
4599 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4600 and endian.h.
4601 (aarch64_get_thread_area): New target method.
4602 (extract_signed_bitfield): New helper function.
4603 (aarch64_decode_ldr_literal): New function.
4604 (enum aarch64_opcodes): New enum.
4605 (struct aarch64_register): New struct.
4606 (struct aarch64_operand): New struct.
4607 (x0): New static global.
4608 (x1): Likewise.
4609 (x2): Likewise.
4610 (x3): Likewise.
4611 (x4): Likewise.
4612 (w2): Likewise.
4613 (ip0): Likewise.
4614 (sp): Likewise.
4615 (xzr): Likewise.
4616 (aarch64_register): New helper function.
4617 (register_operand): Likewise.
4618 (immediate_operand): Likewise.
4619 (struct aarch64_memory_operand): New struct.
4620 (offset_memory_operand): New helper function.
4621 (preindex_memory_operand): Likewise.
4622 (enum aarch64_system_control_registers): New enum.
4623 (ENCODE): New macro.
4624 (emit_insn): New helper function.
4625 (emit_b): New function.
4626 (emit_bcond): Likewise.
4627 (emit_cb): Likewise.
4628 (emit_tb): Likewise.
4629 (emit_blr): Likewise.
4630 (emit_stp): Likewise.
4631 (emit_ldp_q_offset): Likewise.
4632 (emit_stp_q_offset): Likewise.
4633 (emit_load_store): Likewise.
4634 (emit_ldr): Likewise.
4635 (emit_ldrsw): Likewise.
4636 (emit_str): Likewise.
4637 (emit_ldaxr): Likewise.
4638 (emit_stxr): Likewise.
4639 (emit_stlr): Likewise.
4640 (emit_data_processing_reg): Likewise.
4641 (emit_data_processing): Likewise.
4642 (emit_add): Likewise.
4643 (emit_sub): Likewise.
4644 (emit_mov): Likewise.
4645 (emit_movk): Likewise.
4646 (emit_mov_addr): Likewise.
4647 (emit_mrs): Likewise.
4648 (emit_msr): Likewise.
4649 (emit_sevl): Likewise.
4650 (emit_wfe): Likewise.
4651 (append_insns): Likewise.
4652 (can_encode_int32_in): New helper function.
4653 (aarch64_relocate_instruction): New function.
4654 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4655 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4656 (struct linux_target_ops): Install aarch64_get_thread_area,
4657 aarch64_install_fast_tracepoint_jump_pad and
4658 aarch64_get_min_fast_tracepoint_insn_len.
4659
787749ea
PL
46602015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4661
4662 * Makefile.in (aarch64-insn.o): New rule.
4663 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4664
9812b2e6
YQ
46652015-09-21 Yao Qi <yao.qi@linaro.org>
4666
4667 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4668
18fe412b
YQ
46692015-09-21 Yao Qi <yao.qi@linaro.org>
4670
4671 * tracepoint.c (max_jump_pad_size): Remove.
4672
a0cc84cd
YQ
46732015-09-18 Yao Qi <yao.qi@linaro.org>
4674
4675 * linux-aarch64-low.c: Don't include sys/uio.h.
4676 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4677
d78908cf
WW
46782015-09-16 Wei-cheng Wang <cole945@gmail.com>
4679
4680 * tracepoint.c (eval_result_type): Change prototype.
4681 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4682
d57e0d50
PA
46832015-09-15 Pedro Alves <palves@redhat.com>
4684
4685 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4686 Check whether to report exec events instead of checking whether
4687 multiprocess is enabled.
4688
5a676acc
PA
46892015-09-15 Pedro Alves <palves@redhat.com>
4690
4691 PR remote/18965
4692 * remote-utils.c (prepare_resume_reply): Merge
4693 TARGET_WAITKIND_VFORK_DONE switch case with the
4694 TARGET_WAITKIND_FORKED case.
4695
7c5d0fad
YQ
46962015-09-15 Yao Qi <yao.qi@linaro.org>
4697
4698 * server.c (handle_query): Check string comparison using
4699 "else if" instead of "if".
4700
750ce8d1
YQ
47012015-09-15 Yao Qi <yao.qi@linaro.org>
4702
4703 * server.c (vCont_supported): New global variable.
4704 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4705 matches. Append ";vContSupported+" to own_buf.
4706 (handle_v_requests): Append ";s;S" to own_buf if target supports
4707 hardware single step or vCont_supported is false.
4708 (capture_main): Set vCont_supported to zero.
4709
70b90b91
YQ
47102015-09-15 Yao Qi <yao.qi@linaro.org>
4711
4712 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4713 it to ...
4714 (linux_supports_hardware_single_step): ... New function.
4715 (linux_target_ops): Update.
4716 * lynx-low.c (lynx_target_ops): Set field
4717 supports_hardware_single_step to target_can_do_hardware_single_step.
4718 * nto-low.c (nto_target_ops): Likewise.
4719 * spu-low.c (spu_target_ops): Likewise.
4720 * win32-low.c (win32_target_ops): Likewise.
4721 * target.c (target_can_do_hardware_single_step): New function.
4722 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4723 Remove. <supports_hardware_single_step>: New field.
4724 (target_supports_conditional_breakpoints): Remove.
4725 (target_supports_hardware_single_step): New macro.
4726 (target_can_do_hardware_single_step): Declare.
4727 * server.c (handle_query): Use target_supports_hardware_single_step
4728 instead of target_supports_conditional_breakpoints.
4729
ade90bde
YQ
47302015-09-15 Yao Qi <yao.qi@linaro.org>
4731
4732 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4733 function.
4734 (struct linux_target_ops the_low_target): Install
4735 aarch64_linux_siginfo_fixup.
4736
94585166
DB
47372015-09-11 Don Breazeal <donb@codesourcery.com>
4738 Luis Machado <lgustavo@codesourcery.com>
4739
4740 * linux-low.c (linux_mourn): Static declaration.
4741 (linux_arch_setup): Move in front of
4742 handle_extended_wait.
4743 (linux_arch_setup_thread): New function.
4744 (handle_extended_wait): Handle exec events. Call
4745 linux_arch_setup_thread. Make event_lwp argument a
4746 pointer-to-a-pointer.
4747 (check_zombie_leaders): Do not check stopped threads.
4748 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4749 (linux_low_filter_event): Add lwp and thread for exec'ing
4750 non-leader thread if leader thread has been deleted.
4751 Refactor code into linux_arch_setup_thread and call it.
4752 Pass child lwp pointer by reference to handle_extended_wait.
4753 (linux_wait_for_event_filtered): Update comment.
4754 (linux_wait_1): Prevent clobbering exec event status.
4755 (linux_supports_exec_events): New function.
4756 (linux_target_ops) <supports_exec_events>: Initialize new member.
4757 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4758 new member.
4759 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4760 * server.c (report_exec_events): New global variable.
4761 (handle_query): Handle qSupported query for exec-events feature.
4762 (captured_main): Initialize report_exec_events.
4763 * server.h (report_exec_events): Declare new global variable.
4764 * target.h (struct target_ops) <supports_exec_events>: New
4765 member.
4766 (target_supports_exec_events): New macro.
4767 * win32-low.c (win32_target_ops) <supports_exec_events>:
4768 Initialize new member.
4769
0568462b
MM
47702015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4771
4772 * linux-low.c (linux_low_enable_btrace): Remove.
4773 (linux_target_ops): Replace linux_low_enable_btrace with
4774 linux_enable_btrace.
4775
39edd165
YQ
47762015-09-03 Yao Qi <yao.qi@linaro.org>
4777
4778 * linux-aarch64-low.c (aarch64_insert_point): Call
4779 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4780 returns true.
4781
1db33b5a
UW
47822015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4783
4784 * linux-low.c (check_stopped_by_breakpoint): Use
4785 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4786
ab290430
PA
47872015-08-27 Pedro Alves <palves@redhat.com>
4788
4789 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4790
8d749320
SM
47912015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4792
6711b7f8
SM
4793 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4794 the XNEW-family equivalent.
8d749320
SM
4795 (compile_bytecodes): Likewise.
4796 * dll.c (loaded_dll): Likewise.
4797 * event-loop.c (append_callback_event): Likewise.
4798 (create_file_handler): Likewise.
4799 (create_file_event): Likewise.
4800 * hostio.c (handle_open): Likewise.
4801 * inferiors.c (add_thread): Likewise.
4802 (add_process): Likewise.
4803 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4804 * linux-arm-low.c (arm_new_process): Likewise.
4805 (arm_new_thread): Likewise.
4806 * linux-low.c (add_to_pid_list): Likewise.
4807 (linux_add_process): Likewise.
4808 (handle_extended_wait): Likewise.
4809 (add_lwp): Likewise.
4810 (enqueue_one_deferred_signal): Likewise.
4811 (enqueue_pending_signal): Likewise.
4812 (linux_resume_one_lwp_throw): Likewise.
4813 (linux_resume_one_thread): Likewise.
4814 (linux_read_memory): Likewise.
4815 (linux_write_memory): Likewise.
4816 * linux-mips-low.c (mips_linux_new_process): Likewise.
4817 (mips_linux_new_thread): Likewise.
4818 (mips_add_watchpoint): Likewise.
4819 * linux-x86-low.c (initialize_low_arch): Likewise.
4820 * lynx-low.c (lynx_add_process): Likewise.
4821 * mem-break.c (set_raw_breakpoint_at): Likewise.
4822 (set_breakpoint): Likewise.
4823 (add_condition_to_breakpoint): Likewise.
4824 (add_commands_to_breakpoint): Likewise.
4825 (clone_agent_expr): Likewise.
4826 (clone_one_breakpoint): Likewise.
4827 * regcache.c (new_register_cache): Likewise.
4828 * remote-utils.c (look_up_one_symbol): Likewise.
4829 * server.c (queue_stop_reply): Likewise.
4830 (start_inferior): Likewise.
4831 (queue_stop_reply_callback): Likewise.
4832 (handle_target_event): Likewise.
4833 * spu-low.c (fetch_ppc_memory): Likewise.
4834 (store_ppc_memory): Likewise.
4835 * target.c (set_target_ops): Likewise.
4836 * thread-db.c (thread_db_load_search): Likewise.
4837 (try_thread_db_load_1): Likewise.
4838 * tracepoint.c (add_tracepoint): Likewise.
4839 (add_tracepoint_action): Likewise.
4840 (create_trace_state_variable): Likewise.
4841 (cmd_qtdpsrc): Likewise.
4842 (cmd_qtro): Likewise.
4843 (add_while_stepping_state): Likewise.
4844 * win32-low.c (child_add_thread): Likewise.
4845 (get_image_name): Likewise.
4846
ed8b7b42
YQ
48472015-08-25 Yao Qi <yao.qi@linaro.org>
4848
4849 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4850
db3cb7cb
YQ
48512015-08-25 Yao Qi <yao.qi@linaro.org>
4852
4853 * Makefile.in (aarch64-linux.o): New rule.
4854 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4855 srv_tgtobj.
4856 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4857 (aarch64_init_debug_reg_state): Make it extern.
4858 (aarch64_linux_prepare_to_resume): Remove.
4859
f6011a1c
YQ
48602015-08-25 Yao Qi <yao.qi@linaro.org>
4861
4862 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4863 lwp_arch_private_info and ptid_of_lwp.
4864
88e2cf7e
YQ
48652015-08-25 Yao Qi <yao.qi@linaro.org>
4866
4867 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4868 Find proc_info by find_process_pid. All callers updated.
4869
5e35436e
YQ
48702015-08-25 Yao Qi <yao.qi@linaro.org>
4871
4872 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4873 Remove.
4874 (debug_reg_change_callback): Remove.
4875 (aarch64_notify_debug_reg_change): Remove.
4876
4a8a7965
YQ
48772015-08-25 Yao Qi <yao.qi@linaro.org>
4878
4879 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4880 Call current_lwp_ptid.
4881
32a271ee
YQ
48822015-08-25 Yao Qi <yao.qi@linaro.org>
4883
4884 * linux-aarch64-low.c (debug_reg_change_callback): Use
4885 debug_printf.
4886
0d51c8d7
YQ
48872015-08-25 Yao Qi <yao.qi@linaro.org>
4888
4889 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4890
31a43dd5
YQ
48912015-08-25 Yao Qi <yao.qi@linaro.org>
4892
4893 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4894
8ee52567
YQ
48952015-08-25 Yao Qi <yao.qi@linaro.org>
4896
4897 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4898 the code.
4899
ff3f0f45
YQ
49002015-08-25 Yao Qi <yao.qi@linaro.org>
4901
4902 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4903 Remove.
4904 (debug_reg_change_callback): Remove argument entry and add argument
4905 lwp. Remove local variable thread. Don't print thread id in the
4906 debugging output. Don't check whether pid of thread equals to pid.
4907 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4908 iterate_over_lwps instead find_inferior.
4909
3d40fbb5
PA
49102015-08-24 Pedro Alves <palves@redhat.com>
4911
4912 * inferiors.c (get_first_process): New function.
4913 * inferiors.h (get_first_process): New declaration.
4914 * remote-utils.c (read_ptid): Default to the first process in the
4915 list, instead of to the current thread's process.
4916
438e1e42
PA
49172015-08-24 Pedro Alves <palves@redhat.com>
4918
4919 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4920 * event-loop.c: Likewise.
4921 * remote-utils.c: Likewise.
4922 * tracepoint.c: Likewise.
4923
a8c6d4fc
PA
49242015-08-24 Pedro Alves <palves@redhat.com>
4925
4926 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4927 ptid_get_lwp.
4928
99b0bb12
PA
49292015-08-21 Pedro Alves <palves@redhat.com>
4930
4931 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4932 instead of literal 1.
4933
f8904751
PA
49342015-08-21 Pedro Alves <palves@redhat.com>
4935
4936 * tdesc.c (default_description): Explicitly zero-initialize.
4937
465a859e
PA
49382015-08-21 Pedro Alves <palves@redhat.com>
4939
4940 PR gdb/18749
4941 * inferiors.c (remove_thread): Discard any pending stop reply for
4942 this thread.
4943 * server.c (remove_all_on_match_pid): Rename to ...
4944 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4945 instead of a pid.
4946 (discard_queued_stop_replies): Change parameter to a ptid. Now
4947 extern.
4948 (handle_v_kill, kill_inferior_callback, captured_main)
4949 (process_serial_event): Adjust.
4950 * server.h (discard_queued_stop_replies): Declare.
4951
f0db101d
PA
49522015-08-21 Pedro Alves <palves@redhat.com>
4953
4954 * linux-low.c (wait_for_sigstop): Always switch to no thread
4955 selected if the previously current thread dies.
4956 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4957 process instead of the current thread's.
4958 * remote-utils.c (input_interrupt): Don't check if there's no
4959 current thread.
4960 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4961 current thread to the general thread fails, error out.
4962 (handle_qxfer_auxv, handle_qxfer_libraries)
4963 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4964 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4965 (handle_query): Check if there's a thread selected instead of
4966 checking whether there's any thread in the thread list.
4967 (handle_qxfer_threads, handle_qxfer_btrace)
4968 (handle_qxfer_btrace_conf): Don't error out early if there's no
4969 thread in the thread list.
4970 (handle_v_cont, myresume): Don't set the current thread to the
4971 continue thread.
4972 (process_serial_event) <Hg handling>: Also set thread_id if the
4973 previous general thread is still alive.
4974 (process_serial_event) <g/G handling>: If setting the current
4975 thread to the general thread fails, error out.
4976 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4977 thread's lwp instead of the current thread's.
4978 * target.c (set_desired_thread): If the desired thread was not
4979 found, leave the current thread pointing to NULL. Return an int
4980 (boolean) indicating success.
4981 * target.h (set_desired_thread): Change return type to int.
4982
40045d91
MF
49832015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4984
4985 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4986 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4987 #includes.
4988 (ps_get_thread_area): New function.
4989
45face3b
GB
49902015-08-19 Gary Benson <gbenson@redhat.com>
4991
4992 * hostio.c (handle_pread): Do not attempt to read more data
4993 than hostio_reply_with_data can fit in a packet.
4994
16d5f642
JB
49952015-08-18 Joel Brobecker <brobecker@adacore.com>
4996
4997 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4998
a738da3a
MF
49992015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5000
5001 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5002
33ebda9d
PA
50032015-08-06 Pedro Alves <palves@redhat.com>
5004
5005 * tracepoint.c (expr_eval_result): Now an int.
5006
a44892be
PA
50072015-08-06 Pedro Alves <palves@redhat.com>
5008
5009 * gdbthread.h (struct regcache): Forward declare.
5010 (struct thread_info) <regcache_data>: Now a struct regcache
5011 pointer.
5012 * inferiors.c (inferior_regcache_data)
5013 (set_inferior_regcache_data): Now work with struct regcache
5014 pointers.
5015 * inferiors.h (struct regcache): Forward declare.
5016 (inferior_regcache_data, set_inferior_regcache_data): Now work
5017 with struct regcache pointers.
5018 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5019 (free_register_cache_thread): Remove struct regcache pointer
5020 casts.
5021
608a1e46
PA
50222015-08-06 Pedro Alves <palves@redhat.com>
5023
5024 * server.c (captured_main): On error, print the exception message
5025 to stderr, and if run_once is set, throw a quit.
5026
f0ce0d3a
PA
50272015-08-06 Pedro Alves <palves@redhat.com>
5028
5029 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5030 the current thread.
5031
bf47e248
PA
50322015-08-06 Pedro Alves <palves@redhat.com>
5033
5034 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5035 reading beyond the passed in buffer length.
5036
b6b9ffcc
PL
50372015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5038
5039 * tracepoint.c (symbol_list) <required>: Remove.
5040
863d01bd
PA
50412015-08-06 Pedro Alves <palves@redhat.com>
5042
5043 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5044 count if stopping and suspending threads.
5045 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5046 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5047 (linux_detach): Complete an ongoing step-over.
5048 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5049 throughout.
5050 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5051 (linux_wait_1): If passing a signal to the inferior after
5052 finishing a step-over, unsuspend and re-resume all lwps. If we
5053 see a single-step event but the thread should be continuing, don't
5054 pass the trap to gdb.
5055 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5056 internal_error instead of gdb_assert.
5057 (enqueue_pending_signal): New function.
5058 (check_ptrace_stopped_lwp_gone): Add debug output.
5059 (start_step_over): Use internal_error instead of gdb_assert.
5060 (complete_ongoing_step_over): New function.
5061 (linux_resume_one_thread): Don't resume a suspended thread.
5062 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5063 it stepping.
5064
00db26fa
PA
50652015-08-06 Pedro Alves <palves@redhat.com>
5066
5067 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5068 (linux_thread_alive): Use lwp_is_marked_dead.
5069 (extended_event_reported): Delete.
5070 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5071 instead of extended_event_reported.
5072 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5073 as well.
5074 (lwp_is_marked_dead): New function.
5075 (lwp_running): Use lwp_is_marked_dead.
5076 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5077 comment.
5078
ad071a30
PA
50792015-08-06 Pedro Alves <palves@redhat.com>
5080
5081 * linux-low.c (linux_wait_1): Move fork event output out of the
5082 !report_to_gdb check. Pass event_child->waitstatus to
5083 target_waitstatus_to_string instead of ourstatus.
5084
524b57e6
YQ
50852015-08-04 Yao Qi <yao.qi@linaro.org>
5086
5087 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5088 if current_thread is 32 bit.
5089
6085d6f6
YQ
50902015-08-04 Yao Qi <yao.qi@linaro.org>
5091
5092 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5093 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5094 * server.c (extended_protocol): Remove "static".
5095 * server.h (extended_protocol): Declare it.
5096
8a7e4587
YQ
50972015-08-04 Yao Qi <yao.qi@linaro.org>
5098
5099 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5100 both aarch64 and aarch32.
5101 (aarch64_set_pc): Likewise.
5102
3b53ae99
YQ
51032015-08-04 Yao Qi <yao.qi@linaro.org>
5104
5105 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5106 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5107 arm-with-neon.xml to srv_xmlfiles.
5108 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5109 (is_64bit_tdesc): New function.
5110 (aarch64_linux_read_description): New function.
5111 (aarch64_arch_setup): Call aarch64_linux_read_description.
5112 (regs_info): Rename to regs_info_aarch64.
5113 (aarch64_regs_info): Return right regs_info.
5114 (initialize_low_arch): Call initialize_low_arch_aarch32.
5115
bd9e6534
YQ
51162015-08-04 Yao Qi <yao.qi@linaro.org>
5117
5118 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5119 * linux-aarch32-low.c: New file.
5120 * linux-aarch32-low.h: New file.
5121 * linux-arm-low.c (arm_fill_gregset): Move it to
5122 linux-aarch32-low.c.
5123 (arm_store_gregset): Likewise.
5124 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5125 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5126 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5127 (regs_info): Rename to regs_info_arm.
5128 (arm_regs_info): Return regs_info_aarch32 if
5129 have_ptrace_getregset is 1 and target description is
5130 arm_with_neon or arm_with_vfpv3.
5131 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5132 Call initialize_low_arch_aarch32 instead.
5133
ded48a5e
YQ
51342015-08-04 Yao Qi <yao.qi@linaro.org>
5135
5136 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5137 * linux-low.c: ... here.
5138 * linux-low.h (have_ptrace_getregset): Declare it.
5139
96e9210f
PA
51402015-08-04 Pedro Alves <palves@redhat.com>
5141
5142 * thread-db.c (struct thread_db): Use new typedefs.
5143 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5144 CHK calls.
5145 (disable_thread_event_reporting): Cast result of dlsym to
5146 destination function pointer type.
5147 (thread_db_mourn): Use td_ta_delete_ftype.
5148
af60a1ef
SL
51492015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5150
5151 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5152 arch variant.
5153 (CDX_BREAKPOINT): Define for R2.
5154 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5155 (the_low_target): Add comments.
5156
e8b41681
YQ
51572015-07-30 Yao Qi <yao.qi@linaro.org>
5158
5159 * linux-arm-low.c (arm_hwcap): Remove it.
5160 (arm_read_description): New local variable arm_hwcap. Don't
5161 set arm_hwcap to zero.
5162
89abb039
YQ
51632015-07-30 Yao Qi <yao.qi@linaro.org>
5164
5165 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5166 Use regcache->tdesc instead.
5167 (arm_store_wmmxregset): Likewise.
5168 (arm_fill_vfpregset): Likewise.
5169 (arm_store_vfpregset): Likewise.
5170
deca266c
YQ
51712015-07-30 Yao Qi <yao.qi@linaro.org>
5172
5173 * linux-arm-low.c: Include arch/arm.h.
5174 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5175 (arm_store_gregset): Likewise.
5176
aa58a496
SM
51772015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5178
5179 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5180 ptrace's 4th parameter.
5181
50904b25
YQ
51822015-07-27 Yao Qi <yao.qi@linaro.org>
5183
5184 * configure.srv (case aarch64*-*-linux*): Don't set
5185 srv_linux_usrregs.
5186
5826e159
PA
51872015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5188
5189 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5190 sys/ptrace.h.
5191 * linux-arm-low.c: Likewise.
5192 * linux-cris-low.c: Likewise.
5193 * linux-crisv32-low.c: Likewise.
5194 * linux-low.c: Likewise.
5195 * linux-m68k-low.c: Likewise.
5196 * linux-mips-low.c: Likewise.
5197 * linux-nios2-low.c: Likewise.
5198 * linux-s390-low.c: Likewise.
5199 * linux-sparc-low.c: Likewise.
5200 * linux-tic6x-low.c: Likewise.
5201 * linux-tile-low.c: Likewise.
5202 * linux-x86-low.c: Likewise.
5203
54019719
PA
52042015-07-24 Pedro Alves <palves@redhat.com>
5205
5206 * config.in: Regenerate.
5207 * configure: Regenerate.
5208
eb7aa561
PA
52092015-07-24 Pedro Alves <palves@redhat.com>
5210
5211 * acinclude.m4: Include ../ptrace.m4.
5212 * configure.ac: Call GDB_AC_PTRACE.
5213 * config.in, configure: Regenerate.
5214
55d7b841
YQ
52152015-07-24 Yao Qi <yao.qi@linaro.org>
5216
5217 * linux-low.c (linux_create_inferior): Remove setting to
5218 proc->priv->new_inferior.
5219 (linux_attach): Likewise.
5220 (linux_low_filter_event): Likewise.
5221 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5222
c06cbd92
YQ
52232015-07-24 Yao Qi <yao.qi@linaro.org>
5224
5225 * linux-low.c (linux_arch_setup): New function.
5226 (linux_low_filter_event): If proc->tdesc is NULL and
5227 proc->attached is true, call the_low_target.arch_setup.
5228 Otherwise, keep status pending, and return.
5229 (linux_resume_one_lwp_throw): Don't call get_pc if
5230 thread->while_stepping isn't NULL. Don't call
5231 get_thread_regcache if proc->tdesc is NULL.
5232 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5233 (linux_target_ops): Install arch_setup.
5234 * server.c (start_inferior): Call the_target->arch_setup.
5235 * target.h (struct target_ops) <arch_setup>: New field.
5236 (target_arch_setup): New marco.
5237 * lynx-low.c (lynx_target_ops): Update.
5238 * nto-low.c (nto_target_ops): Update.
5239 * spu-low.c (spu_target_ops): Update.
5240 * win32-low.c (win32_target_ops): Update.
5241
5ae3ebba
YQ
52422015-07-24 Yao Qi <yao.qi@linaro.org>
5243
5244 * linux-low.c (linux_add_process): Don't set
5245 proc->priv->new_inferior.
5246 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5247 (linux_attach): Likewise.
5248
eb97750b
YQ
52492015-07-24 Yao Qi <yao.qi@linaro.org>
5250
5251 * server.c (start_inferior): Code refactor.
5252
51aee833
YQ
52532015-07-24 Yao Qi <yao.qi@linaro.org>
5254
5255 * server.c (process_serial_event): Set general_thread.
5256
af1b22f3
YQ
52572015-07-21 Yao Qi <yao.qi@linaro.org>
5258
5259 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5260 aarch64_linux_get_debug_reg_capacity.
5261
554717a3
YQ
52622015-07-17 Yao Qi <yao.qi@linaro.org>
5263
5264 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5265 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5266 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5267 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5268 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5269 (AARCH64_HWP_ALIGNMENT): Likewise.
5270 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5271 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5272 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5273 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5274 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5275 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5276 (struct aarch64_debug_reg_state): Likewise.
5277 (struct arch_lwp_info): Likewise.
5278 (aarch64_align_watchpoint): Likewise.
5279 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5280 (aarch64_watchpoint_length): Likewise.
5281 (aarch64_point_encode_ctrl_reg): Likewise
5282 (aarch64_point_is_aligned): Likewise.
5283 (aarch64_align_watchpoint): Likewise.
5284 (aarch64_linux_set_debug_regs):
5285 (aarch64_dr_state_insert_one_point): Likewise.
5286 (aarch64_dr_state_remove_one_point): Likewise.
5287 (aarch64_handle_breakpoint): Likewise.
5288 (aarch64_handle_aligned_watchpoint): Likewise.
5289 (aarch64_handle_unaligned_watchpoint): Likewise.
5290 (aarch64_handle_watchpoint): Likewise.
5291
c67ca4de
YQ
52922015-07-17 Yao Qi <yao.qi@linaro.org>
5293
5294 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5295 and don't aarch64_get_debug_reg_state. All callers update.
5296 (aarch64_handle_aligned_watchpoint): Likewise.
5297 (aarch64_handle_unaligned_watchpoint): Likewise.
5298 (aarch64_handle_watchpoint): Likewise.
5299 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5300 (aarch64_remove_point): Likewise.
5301
25abf979
YQ
53022015-07-17 Yao Qi <yao.qi@linaro.org>
5303
5304 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5305 debug_printf.
5306 (aarch64_handle_unaligned_watchpoint): Likewise.
5307
db1ff28b
JK
53082015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5309
5310 Revert the previous 3 commits:
5311 Move gdb_regex* to common/
5312 Move linux_find_memory_regions_full & co.
5313 gdbserver build-id attribute generator
5314
700ca40f
JK
53152015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5316 Jan Kratochvil <jan.kratochvil@redhat.com>
5317
5318 gdbserver build-id attribute generator.
5319 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5320 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5321 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5322 (find_phdr): New.
5323 (get_dynamic): Use find_pdhr to traverse program headers.
5324 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5325 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5326 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5327 (get_hex_build_id): New.
5328 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5329 to reply XML document.
5330
9904185c
JK
53312015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5332 Jan Kratochvil <jan.kratochvil@redhat.com>
5333
5334 * target.c: Include target/target-utils.h and fcntl.h.
5335 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5336 (target_fileio_read_stralloc): New functions.
5337
6e5b4429
JK
53382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5339
5340 * Makefile.in (OBS): Add gdb_regex.o.
5341 (gdb_regex.o): New.
5342 * config.in: Rebuilt.
5343 * configure: Rebuilt.
5344
ddc98fbf
JK
53452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5346 Jan Kratochvil <jan.kratochvil@redhat.com>
5347
5348 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5349 * Makefile.in (OBS): Add target-utils.o.
5350 (linux-maps.o, target-utils.o): New.
5351 * configure.srv (srv_linux_obj): Add linux-maps.o.
5352
e57bb7a0
PL
53532015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5354
5355 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5356 function, return 1.
5357 (the_low_target): Install it.
5358
586b02a9
PA
53592015-07-14 Pedro Alves <palves@redhat.com>
5360
5361 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5362 Instead, ignore ECHILD, and throw an error for other errnos.
5363
58c1b36c
PA
53642015-07-10 Pedro Alves <palves@redhat.com>
5365
5366 * event-loop.c (struct callback_event) <data>: Change type to
5367 gdb_client_data instance instead of gdb_client_data pointer.
5368 (append_callback_event): Adjust.
5369
421530db
PL
53702015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5371
5372 * linux-aarch64-low.c: Add comments for each linux_target_ops
5373 method. Remove comments already covered in target_ops and
5374 linux_target_ops definitions.
5375 (the_low_target): Add comments for each unimplemented method.
5376
c2d65f38
YQ
53772015-07-09 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-aarch64-low.c (aarch64_regmap): Remove.
5380 (aarch64_usrregs_info): Remove.
5381 (regs_info): Set field usrregs to NULL.
5382
b20a6524
MM
53832015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5384
5385 * linux-low.c: Include "rsp-low.h"
5386 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5387 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5388 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5389 (handle_btrace_enable_pt): New.
5390 (handle_btrace_general_set): Support "pt".
5391 (handle_btrace_conf_general_set): Support "pt:size".
5392
96c97461
PL
53932015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5394
5395 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5396 Z_PACKET_SW_BP.
5397
37d66942
PL
53982015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5399
5400 * linux-aarch64-low.c: Remove comment about endianness.
5401 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5402 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5403 memcmp.
5404
dc06243f
GB
54052015-06-24 Gary Benson <gbenson@redhat.com>
5406
5407 * linux-i386-ipa.c (stdint.h): Do not include.
5408 * lynx-i386-low.c (stdint.h): Likewise.
5409 * lynx-ppc-low.c (stdint.h): Likewise.
5410 * mem-break.c (stdint.h): Likewise.
5411 * thread-db.c (stdint.h): Likewise.
5412 * tracepoint.c (stdint.h): Likewise.
5413 * win32-low.c (stdint.h): Likewise.
5414
124e13d9
SM
54152015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5416
5417 * server.c (write_qxfer_response): Update call to
5418 remote_escape_output.
5419
909c2cda
JK
54202015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5421 Jan Kratochvil <jan.kratochvil@redhat.com>
5422
5423 Merge multiple hex conversions.
5424 * gdbreplay.c (tohex): Rename to 'fromhex'.
5425 (logchar): Use fromhex.
5426
24c05f46
JK
54272015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5428
5429 * server.c (handle_qxfer_libraries): Set `version' attribute for
5430 <library-list>.
5431
14d2069a
GB
54322015-06-10 Gary Benson <gbenson@redhat.com>
5433
5434 * target.h (struct target_ops) <multifs_open>: New field.
5435 <multifs_unlink>: Likewise.
5436 <multifs_readlink>: Likewise.
5437 * linux-low.c (nat/linux-namespaces.h): New include.
5438 (linux_target_ops): Initialize the_target->multifs_open,
5439 the_target->multifs_unlink and the_target->multifs_readlink.
5440 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5441 * hostio.c (hostio_fs_pid): New static variable.
5442 (hostio_handle_new_gdb_connection): New function.
5443 (handle_setfs): Likewise.
5444 (handle_open): Use the_target->multifs_open as appropriate.
5445 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5446 (handle_readlink): Use the_target->multifs_readlink as
5447 appropriate.
5448 (handle_vFile): Handle vFile:setfs packets.
5449 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5450 after target_handle_new_gdb_connection.
5451
4b8b5e72
GB
54522015-06-10 Gary Benson <gbenson@redhat.com>
5453
5454 * configure.ac (AC_CHECK_FUNCS): Add setns.
5455 * config.in: Regenerate.
5456 * configure: Likewise.
5457 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5458 (linux-namespaces.o): New rule.
5459 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5460
3ac2e371
GB
54612015-06-09 Gary Benson <gbenson@redhat.com>
5462
5463 * hostio.c (handle_open): Process mode argument with
5464 fileio_to_host_mode.
5465
ca9b78ce
YQ
54662015-06-01 Yao Qi <yao.qi@linaro.org>
5467
5468 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5469 * linux-x86-low.c: Likewise.
5470
bfacd19d
DB
54712015-05-28 Don Breazeal <donb@codesourcery.com>
5472
5473 * linux-low.c (handle_extended_wait): Initialize
5474 thread_info.last_resume_kind for new fork children.
5475
452003ef
PA
54762015-05-15 Pedro Alves <palves@redhat.com>
5477
5478 * target.h (target_handle_new_gdb_connection): Rewrite using if
5479 wrapped in do/while.
5480
1041a03c
JB
54812015-05-14 Joel Brobecker <brobecker@adacore.com>
5482
5483 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5484 * configure, config.in: Regenerate.
5485 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5486 Declare typedef.
5487
c269dbdb
DB
54882015-05-12 Don Breazeal <donb@codesourcery.com>
5489
5490 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5491 PTRACE_EVENT_VFORK_DONE.
5492 (linux_low_ptrace_options, extended_event_reported): Add vfork
5493 events.
5494 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5495 and "vforkdone" for RSP 'T' Stop Reply Packet.
5496 * server.h (report_vfork_events): Declare
5497 global variable.
5498
3a8a0396
DB
54992015-05-12 Don Breazeal <donb@codesourcery.com>
5500
5501 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5502 (the_low_target) <new_fork>: Initialize new member.
5503 * linux-arm-low.c (arm_new_fork): New function.
5504 (the_low_target) <new_fork>: Initialize new member.
5505 * linux-low.c (handle_extended_wait): Call new target function
5506 new_fork.
5507 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5508 * linux-mips-low.c (mips_add_watchpoint): New function
5509 extracted from mips_insert_point.
5510 (the_low_target) <new_fork>: Initialize new member.
5511 (mips_linux_new_fork): New function.
5512 (mips_insert_point): Call mips_add_watchpoint.
5513 * linux-x86-low.c (x86_linux_new_fork): New function.
5514 (the_low_target) <new_fork>: Initialize new member.
5515
de0d863e
DB
55162015-05-12 Don Breazeal <donb@codesourcery.com>
5517
5518 * linux-low.c (handle_extended_wait): Implement return value,
5519 rename argument 'event_child' to 'event_lwp', handle
5520 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5521 (linux_low_ptrace_options): New function.
5522 (linux_low_filter_event): Call linux_low_ptrace_options,
5523 use different argument fo linux_enable_event_reporting,
5524 use return value from handle_extended_wait.
5525 (extended_event_reported): New function.
5526 (linux_wait_1): Call extended_event_reported and set
5527 status to report fork events.
5528 (linux_write_memory): Add pid to debug message.
5529 (reset_lwp_ptrace_options_callback): New function.
5530 (linux_handle_new_gdb_connection): New function.
5531 (linux_target_ops): Initialize new structure member.
5532 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5533 * lynx-low.c: Initialize new structure member.
5534 * remote-utils.c (prepare_resume_reply): Implement stop reason
5535 "fork" for "T" stop message.
5536 * server.c (handle_query): Call handle_new_gdb_connection.
5537 * server.h (report_fork_events): Declare global flag.
5538 * target.h (struct target_ops) <handle_new_gdb_connection>:
5539 New member.
5540 (target_handle_new_gdb_connection): New macro.
5541 * win32-low.c: Initialize new structure member.
5542
ddcbc397
DB
55432015-05-12 Don Breazeal <donb@codesourcery.com>
5544
5545 * mem-break.c (APPEND_TO_LIST): Define macro.
5546 (clone_agent_expr): New function.
5547 (clone_one_breakpoint): New function.
5548 (clone_all_breakpoints): New function.
5549 * mem-break.h: Declare new functions.
5550
89245bc0
DB
55512015-05-12 Don Breazeal <donb@codesourcery.com>
5552
5553 * linux-low.c (linux_supports_fork_events): New function.
5554 (linux_supports_vfork_events): New function.
5555 (linux_target_ops): Initialize new structure members.
5556 (initialize_low): Call linux_check_ptrace_features.
5557 * lynx-low.c (lynx_target_ops): Initialize new structure
5558 members.
5559 * server.c (report_fork_events, report_vfork_events):
5560 New global flags.
5561 (handle_query): Add new features to qSupported packet and
5562 response.
5563 (captured_main): Initialize new global variables.
5564 * target.h (struct target_ops) <supports_fork_events>:
5565 New member.
5566 <supports_vfork_events>: New member.
5567 (target_supports_fork_events): New macro.
5568 (target_supports_vfork_events): New macro.
5569 * win32-low.c (win32_target_ops): Initialize new structure
5570 members.
5571
835205d0
GB
55722015-05-12 Gary Benson <gbenson@redhat.com>
5573
5574 * server.c (handle_qxfer_exec_file): Use current process
5575 if annex is empty.
5576
21e94bd9
SL
55772015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5578
5579 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5580 Remove HAVE_PTRACE_GETREGS conditionals.
5581 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5582 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5583
45614f15
YQ
55842015-05-08 Yao Qi <yao.qi@linaro.org>
5585
5586 * linux-low.c (linux_supports_conditional_breakpoints): New
5587 function.
5588 (linux_target_ops): Install new target method.
5589 * lynx-low.c (lynx_target_ops): Install NULL hook for
5590 supports_conditional_breakpoints.
5591 * nto-low.c (nto_target_ops): Likewise.
5592 * spu-low.c (spu_target_ops): Likewise.
5593 * win32-low.c (win32_target_ops): Likewise.
5594 * server.c (handle_query): Check
5595 target_supports_conditional_breakpoints.
5596 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5597 New field.
5598 (target_supports_conditional_breakpoints): New macro.
5599
80ad801e
PA
56002015-05-06 Pedro Alves <palves@redhat.com>
5601
5602 PR server/18081
5603 * server.c (start_inferior): If the process exits, mourn it.
5604
819843c7
GB
56052015-04-21 Gary Benson <gbenson@redhat.com>
5606
5607 * hostio.c (fileio_open_flags_to_host): Factored out to
5608 fileio_to_host_openflags in common/fileio.c. Single use
5609 updated.
5610
a2d5a9d7
MF
56112015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5612
5613 * linux-xtensa-low.c (xtensa_fill_gregset)
5614 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5615 XCHAL_HAVE_LOOP.
5616
deb44829
MF
56172015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5618
5619 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5620 (regs_info): Replace usrregs pointer with NULL.
5621
e57f1de3
GB
56222015-04-17 Gary Benson <gbenson@redhat.com>
5623
5624 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5625 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5626 * server.c (handle_qxfer_exec_file): New function.
5627 (qxfer_packets): Add exec-file entry.
5628 (handle_query): Report qXfer:exec-file:read as supported packet.
5629
62828379
RN
56302015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5631
5632 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5633
b88bb450
GB
56342015-04-09 Gary Benson <gbenson@redhat.com>
5635
5636 * hostio-errno.c (errno_to_fileio_error): Remove function.
5637 Update caller to use remote_fileio_to_fio_error.
5638
c8f4bfdd
YQ
56392015-04-09 Yao Qi <yao.qi@linaro.org>
5640
5641 * linux-low.c (linux_insert_point): Call
5642 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5643 (linux_remove_point): Call remove_memory_breakpoint if type is
5644 raw_bkpt_type_sw.
5645 * linux-x86-low.c (x86_insert_point): Don't call
5646 insert_memory_breakpoint.
5647 (x86_remove_point): Don't call remove_memory_breakpoint.
5648
41f98f02
PA
56492015-04-01 Pedro Alves <palves@redhat.com>
5650 Cleber Rosa <crosa@redhat.com>
5651
5652 * server.c (gdbserver_usage): Reorganize and extend the usage
5653 message.
5654
2bf6fb9d
PA
56552015-03-24 Pedro Alves <palves@redhat.com>
5656
5657 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5658 output. Also dump TRAP_TRACE.
5659 (linux_low_filter_event): In debug output, distinguish a
5660 resume_stop SIGSTOP from a delayed SIGSTOP.
5661
369f6daa
GB
56622015-03-24 Gary Benson <gbenson@redhat.com>
5663
5664 * linux-x86-low.c (x86_linux_new_thread): Moved to
5665 nat/x86-linux.c.
5666 (x86_linux_prepare_to_resume): Likewise.
5667
8e5d4070
GB
56682015-03-24 Gary Benson <gbenson@redhat.com>
5669
5670 * Makefile.in (x86-linux-dregs.o): New rule.
5671 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5672 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5673 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5674 (x86_linux_dr_get): Likewise.
5675 (x86_linux_dr_set): Likewise.
5676 (update_debug_registers_callback): Likewise.
5677 (x86_linux_dr_set_addr): Likewise.
5678 (x86_linux_dr_get_addr): Likewise.
5679 (x86_linux_dr_set_control): Likewise.
5680 (x86_linux_dr_get_control): Likewise.
5681 (x86_linux_dr_get_status): Likewise.
5682 (x86_linux_update_debug_registers): Likewise.
5683
2b95d440
GB
56842015-03-24 Gary Benson <gbenson@redhat.com>
5685
5686 * linux-x86-low.c (x86_linux_update_debug_registers):
5687 New function, factored out from...
5688 (x86_linux_prepare_to_resume): ...this.
5689
14b0bc68
GB
56902015-03-24 Gary Benson <gbenson@redhat.com>
5691
5692 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5693 (x86_linux_dr_set): Likewise.
5694 (update_debug_registers_callback): Likewise.
5695 (x86_linux_dr_set_addr): Likewise.
5696 (x86_linux_dr_get_addr): Likewise.
5697 (x86_linux_dr_set_control): Likewise.
5698 (x86_linux_dr_get_control): Likewise.
5699 (x86_linux_dr_get_status): Likewise.
5700 (x86_linux_prepare_to_resume): Likewise.
5701
5dfe6ca8
GB
57022015-03-24 Gary Benson <gbenson@redhat.com>
5703
5704 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5705 Use perror_with_name. Pass string through gettext.
5706 (x86_linux_dr_set): Likewise.
5707
d33472ad
GB
57082015-03-24 Gary Benson <gbenson@redhat.com>
5709
5710 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5711 (x86_linux_dr_set_addr): ...this.
5712 (x86_dr_low_get_addr): Rename to...
5713 (x86_linux_dr_get_addr): ...this.
5714 (x86_dr_low_set_control): Rename to...
5715 (x86_linux_dr_set_control): ...this.
5716 (x86_dr_low_get_control): Rename to...
5717 (x86_linux_dr_get_control): ...this.
5718 (x86_dr_low_get_status): Rename to...
5719 (x86_linux_dr_get_status): ...this.
5720 (x86_dr_low): Update with new function names.
5721
4b134ca1
GB
57222015-03-24 Gary Benson <gbenson@redhat.com>
5723
5724 * Makefile.in (x86-linux.o): New rule.
5725 * configure.srv: Add x86-linux.o to relevant targets.
5726 * linux-low.c (lwp_set_arch_private_info): New function.
5727 (lwp_arch_private_info): Likewise.
5728 * linux-x86-low.c: Include nat/x86-linux.h.
5729 (arch_lwp_info): Removed structure.
5730 (update_debug_registers_callback):
5731 Use lwp_set_debug_registers_changed.
5732 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5733 and lwp_set_debug_registers_changed.
5734 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5735
34c703da
GB
57362015-03-24 Gary Benson <gbenson@redhat.com>
5737
5738 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5739 * linux-arm-low.c (arm_new_thread): Likewise.
5740 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5741 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5742 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5743 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5744
cff068da
GB
57452015-03-24 Gary Benson <gbenson@redhat.com>
5746
5747 * linux-low.c (ptid_of_lwp): New function.
5748 (lwp_is_stopped): Likewise.
5749 (lwp_stop_reason): Likewise.
5750 * linux-x86-low.c (update_debug_registers_callback):
5751 Use lwp_is_stopped.
5752 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5753 lwp_stop_reason.
5754
b2f7c7e8
GB
57552015-03-24 Gary Benson <gbenson@redhat.com>
5756
5757 * linux-low.h (linux_stop_lwp): Remove declaration.
5758
6d4ee8c6
GB
57592015-03-24 Gary Benson <gbenson@redhat.com>
5760
5761 * linux-low.h: Include nat/linux-nat.h.
5762 * linux-low.c (iterate_over_lwps_args): New structure.
5763 (iterate_over_lwps_filter): New function.
5764 (iterate_over_lwps): Likewise.
5765 * linux-x86-low.c (update_debug_registers_callback):
5766 Update signature to what iterate_over_lwps expects.
5767 Remove PID check that iterate_over_lwps now performs.
5768 (x86_dr_low_set_addr): Use iterate_over_lwps.
5769 (x86_dr_low_set_control): Likewise.
5770
70a0bb6b
GB
57712015-03-24 Gary Benson <gbenson@redhat.com>
5772
5773 * linux-x86-low.c (x86_debug_reg_state): New function.
5774 (x86_linux_prepare_to_resume): Use the above.
5775
7b669087
GB
57762015-03-24 Gary Benson <gbenson@redhat.com>
5777
5778 * linux-low.c (current_lwp_ptid): New function.
5779 * linux-x86-low.c: Include nat/linux-nat.h.
5780 (x86_dr_low_get_addr): Use current_lwp_ptid.
5781 (x86_dr_low_get_control): Likewise.
5782 (x86_dr_low_get_status): Likewise.
5783
eef49a3d
PA
57842015-03-20 Pedro Alves <palves@redhat.com>
5785
5786 * tracepoint.c (cmd_qtstatus): Make "str" const.
5787
b2333d22
PA
57882015-03-20 Pedro Alves <palves@redhat.com>
5789
5790 * server.c (handle_general_set): Make "req_str" const.
5791
23f238d3
PA
57922015-03-19 Pedro Alves <palves@redhat.com>
5793
5794 * linux-low.c (linux_resume_one_lwp): Rename to ...
5795 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5796 instead call perror_with_name.
5797 (check_ptrace_stopped_lwp_gone): New function.
5798 (linux_resume_one_lwp): Reimplement as wrapper around
5799 linux_resume_one_lwp_throw that swallows errors if the LWP is
5800 gone.
5801
91baf43f
PA
58022015-03-19 Pedro Alves <palves@redhat.com>
5803
5804 * linux-low.c (count_events_callback, select_event_lwp_callback):
5805 No longer check whether the thread has resume_stop as last resume
5806 kind.
5807
8bf3b159
PA
58082015-03-19 Pedro Alves <palves@redhat.com>
5809
5810 * linux-low.c (count_events_callback, select_event_lwp_callback):
5811 Use the lwp's status_pending_p field, not the thread's.
5812
b90fc188
PA
58132015-03-19 Pedro Alves <palves@redhat.com>
5814
5815 * linux-low.c (select_event_lwp_callback): Update comments to
5816 no longer mention SIGTRAP.
5817
464b0089
GB
58182015-03-18 Gary Benson <gbenson@redhat.com>
5819
5820 * server.c (handle_query): Do not report vFile:fstat as supported.
5821
aa9e327f
GB
58222015-03-11 Gary Benson <gbenson@redhat.com>
5823
5824 * hostio.c (sys/types.h): New include.
5825 (sys/stat.h): Likewise.
5826 (common-remote-fileio.h): Likewise.
5827 (handle_fstat): New function.
5828 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5829
791c0056
GB
58302015-03-11 Gary Benson <gbenson@redhat.com>
5831
5832 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5833 struct stat.st_blocks and struct stat.st_blksize.
5834 * configure: Regenerate.
5835 * config.in: Likewise.
5836 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5837 (OBS): Add common-remote-fileio.o.
5838 (common-remote-fileio.o): New rule.
5839
9a9df970
PA
58402015-03-09 Pedro Alves <palves@redhat.com>
5841
5842 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5843 'struct sockaddr' pointer in 'accept' call.
5844
9eb1356e
PA
58452015-03-09 Pedro Alves <palves@redhat.com>
5846
5847 Revert:
5848 2015-03-07 Pedro Alves <palves@redhat.com>
5849 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5850 or <winsock2.h> here. Instead include "gdb_socket.h".
5851 (remote_open): Use union gdb_sockaddr_u.
5852 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5853 or <winsock2.h> here. Instead include "gdb_socket.h".
5854 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5855 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5856 or <sys/un.h>.
5857 (init_named_socket, gdb_agent_helper_thread): Use union
5858 gdb_sockaddr_u.
5859
aac331e4
PA
58602015-03-07 Pedro Alves <palves@redhat.com>
5861
5862 * configure.ac (build_warnings): Move
5863 -Wdeclaration-after-statement to the C-specific set.
5864 * configure: Regenerate.
5865
366c75fc
PA
58662015-03-07 Pedro Alves <palves@redhat.com>
5867
5868 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5869 or <winsock2.h> here. Instead include "gdb_socket.h".
5870 (remote_open): Use union gdb_sockaddr_u.
5871 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5872 or <winsock2.h> here. Instead include "gdb_socket.h".
5873 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5874 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5875 or <sys/un.h>.
5876 (init_named_socket, gdb_agent_helper_thread): Use union
5877 gdb_sockaddr_u.
5878
492d29ea
PA
58792015-03-07 Pedro Alves <palves@redhat.com>
5880
5881 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5882 instead.
5883
60a191ed
YQ
58842015-03-06 Yao Qi <yao.qi@linaro.org>
5885
5886 * linux-aarch64-low.c (aarch64_insert_point): Use
5887 show_debug_regs as a boolean.
5888 (aarch64_remove_point): Likewise.
5889
f5771b1d
PA
58902015-03-05 Pedro Alves <palves@redhat.com>
5891
5892 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5893 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5894 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5895 * nto-low.c (nto_target_ops): Likewise.
5896 * spu-low.c (spu_target_ops): Likewise.
5897 * win32-low.c (win32_target_ops): Likewise.
5898
3e572f71
PA
58992015-03-04 Pedro Alves <palves@redhat.com>
5900
72f4393d 5901 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5902 Decide whether a breakpoint triggered based on the SIGTRAP's
5903 siginfo.si_code.
72f4393d
L
5904 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5905 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5906 (linux_low_filter_event): Check for breakpoints before checking
5907 watchpoints.
5908 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5909 siginfo.si_code.
72f4393d
L
5910 (linux_stopped_by_sw_breakpoint)
5911 (linux_supports_stopped_by_sw_breakpoint)
5912 (linux_stopped_by_hw_breakpoint)
5913 (linux_supports_stopped_by_hw_breakpoint): New functions.
5914 (linux_target_ops): Install new target methods.
3e572f71 5915
1ec68e26
PA
59162015-03-04 Pedro Alves <palves@redhat.com>
5917
5918 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5919 * server.c (swbreak_feature, hwbreak_feature): New globals.
5920 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5921 (captured_main): Clear swbreak_feature and hwbreak_feature.
5922 * server.h (swbreak_feature, hwbreak_feature): Declare.
5923 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5924 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5925 supports_stopped_by_hw_breakpoint>: New fields.
5926 (target_supports_stopped_by_sw_breakpoint)
5927 (target_stopped_by_sw_breakpoint)
5928 (target_supports_stopped_by_hw_breakpoint)
5929 (target_stopped_by_hw_breakpoint): Declare.
5930
15c66dd6
PA
59312015-03-04 Pedro Alves <palves@redhat.com>
5932
5933 enum lwp_stop_reason -> enum target_stop_reason
5934 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5935 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5936 (linux_wait_1, stuck_in_jump_pad_callback)
5937 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5938 (linux_stopped_by_watchpoint):
5939 * linux-low.h (enum lwp_stop_reason): Delete.
5940 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5941 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5942
98fc70d6
YQ
59432015-03-04 Yao Qi <yao.qi@linaro.org>
5944
5945 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5946
dd2ac174
GB
59472015-03-03 Gary Benson <gbenson@redhat.com>
5948
5949 * hostio.c (handle_vFile): Fix prefix lengths.
5950
d68e53f4
MM
59512015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5952
5953 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5954 ptr_bits.
5955
bf2d68ab
AA
59562015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5957
5958 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5959 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5960 (clean): Add "rm -f" for above C files.
5961 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5962 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5963 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5964 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5965 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5966 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5967 (init_registers_s390x_vx_linux64)
5968 (init_registers_s390x_tevx_linux64)
5969 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5970 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5971 declarations.
5972 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5973 (s390_store_vxrs_high): New functions.
5974 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5975 NT_S390_VXRS_HIGH.
5976 (s390_arch_setup): Add logic for selecting one of the new target
5977 descriptions. Activate the new vector regsets if applicable.
5978 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5979 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5980 and init_registers_s390x_tevx_linux64.
5981
c966a859
PA
59822015-03-01 Pedro Alves <palves@redhat.com>
5983
5984 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5985 parameter.
5986
4180215b
PA
59872015-02-27 Pedro Alves <palves@redhat.com>
5988
5989 * linux-x86-low.c (u_debugreg_offset): New function.
5990 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5991
749bab01
PA
59922015-02-27 Pedro Alves <palves@redhat.com>
5993
5994 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5995 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5996 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5997 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5998 (ps_lsetfpregs, ps_getpid)
5999 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6000 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6001 (ps_lsetxregs, ps_plog): Declare.
6002
3c14e5a3
PA
60032015-02-27 Pedro Alves <palves@redhat.com>
6004
6005 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6006 IP_AGENT_EXPORT_FUNC.
6007 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6008 IP_AGENT_EXPORT_FUNC.
6009 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6010 (IP_AGENT_EXPORT): Delete.
6011 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6012 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6013 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6014 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6015 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6016 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6017 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6018 (traceframe_read_count, traceframe_write_count)
6019 (traceframes_created, trace_state_variables, get_raw_reg)
6020 (get_trace_state_variable_value, set_trace_state_variable_value)
6021 (ust_loaded, helper_thread_id, cmd_buf): Use
6022 IPA_SYM_EXPORTED_NAME.
6023 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6024 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6025 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6026 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6027 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6028 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6029 EXTERN_C_PUSH/EXTERN_C_POP.
6030 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6031 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6032 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6033 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6034 (traceframe_write_count, traceframe_read_count)
6035 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6036 (about_to_request_buffer_space, get_trace_state_variable_value)
6037 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6038 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6039 EXTERN_C_PUSH/EXTERN_C_POP.
6040 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6041 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6042 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6043 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6044 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6045 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6046 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6047 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6048 Define.
6049 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6050 (IP_AGENT_EXPORT_VAR_DECL): Define.
6051 (tracing): Declare.
6052 (gdb_agent_get_raw_reg): Declare.
6053
fe978cb0
PA
60542015-02-27 Tom Tromey <tromey@redhat.com>
6055 Pedro Alves <palves@redhat.com>
6056
6057 Rename symbols whose names are reserved C++ keywords throughout.
6058
3bc3d82a
PA
60592015-02-27 Pedro Alves <palves@redhat.com>
6060
6061 * Makefile.in (COMPILER): New, get it from autoconf.
6062 (CXX): Get from autoconf instead.
6063 (COMPILE.pre): Use COMPILER.
6064 (CC-LD): Rename to ...
6065 (CC_LD): ... this. Use COMPILER.
6066 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6067 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6068 * acinclude.m4: Include build-with-cxx.m4.
6069 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6070 Disable -Werror by default if building in C++ mode.
6071 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6072 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6073 the C++ compiler. Save/restore CXXFLAGS too.
6074 * configure: Regenerate.
6075
07697489
PA
60762015-02-27 Pedro Alves <palves@redhat.com>
6077
6078 * acinclude.m4: Include libiberty.m4.
6079 * configure.ac: Call libiberty_INIT.
6080 * config.in, configure: Regenerate.
6081
9beb7c4e
PA
60822015-02-26 Pedro Alves <palves@redhat.com>
6083
6084 * linux-low.c (linux_wait_1): When incrementing the PC past a
6085 program breakpoint always use the_low_target.breakpoint_len as
6086 increment, rather than the maximum between that and
6087 the_low_target.decr_pc_after_break.
6088
8090aef2
PA
60892015-02-23 Pedro Alves <palves@redhat.com>
6090
6091 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6092 thread was doing a step-over; always adjust the PC if
6093 we stepped over a permanent breakpoint.
6094 (linux_wait_1): If we stepped over breakpoint that was on top of a
6095 permanent breakpoint, manually advance the PC past it.
6096
bc9540e8
PA
60972015-02-23 Pedro Alves <palves@redhat.com>
6098
6099 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6100 modes.
6101 (x86_fill_gregset, x86_store_gregset): Use it when handling
6102 $orig_eax.
6103
2db9a427
PA
61042015-02-20 Pedro Alves <palves@redhat.com>
6105
6106 * thread-db.c: Include "nat/linux-procfs.h".
6107 (thread_db_init): Skip listing new threads if the kernel supports
6108 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6109
afa8d396
PA
61102015-02-20 Pedro Alves <palves@redhat.com>
6111
6112 * linux-low.c (status_pending_p_callback): Use ptid_match.
6113
c9587f88
AT
61142015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6115
6116 PR breakpoints/16812
6117 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6118 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6119 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6120
b05ec7a5
AT
61212015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6122
6123 PR breakpoints/15956
6124 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6125
d33501a5
MM
61262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6127
6128 * linux-low.c (linux_low_btrace_conf): Print size.
6129 * server.c (handle_btrace_conf_general_set): New.
6130 (hanle_general_set): Call handle_btrace_conf_general_set.
6131 (handle_query): Report Qbtrace-conf:bts:size as supported.
6132
f4abbc16
MM
61332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6134
6135 * linux-low.c (linux_low_enable_btrace): Update parameters.
6136 (linux_low_btrace_conf): New.
6137 (linux_target_ops)<to_btrace_conf>: Initialize.
6138 * server.c (current_btrace_conf): New.
6139 (handle_btrace_enable): Rename to ...
6140 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6141 to target_enable_btrace. Update comment. Update users.
6142 (handle_qxfer_btrace_conf): New.
6143 (qxfer_packets): Add btrace-conf entry.
6144 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6145 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6146 (target_ops)<read_btrace_conf>: New.
6147 (target_enable_btrace): Update parameters.
6148 (target_read_btrace_conf): New.
6149
043c3577
MM
61502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6151
6152 * server.c (handle_btrace_general_set): Remove call to
6153 target_supports_btrace.
6154 (supported_btrace_packets): New.
6155 (handle_query): Call supported_btrace_packets.
6156 * target.h: include btrace-common.h.
6157 (btrace_target_info): Removed.
6158 (supports_btrace, target_supports_btrace): Update parameters.
6159
734b0e4b
MM
61602015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6161
6162 * Makefile.in (SFILES): Add common/btrace-common.c.
6163 (OBS): Add common/btrace-common.o.
6164 (btrace-common.o): Add build rules.
6165 * linux-low: Include btrace-common.h.
6166 (linux_low_read_btrace): Use struct btrace_data. Call
6167 btrace_data_init and btrace_data_fini.
6168
d6c146e9
PA
61692015-02-06 Pedro Alves <palves@redhat.com>
6170
6171 * thread-db.c (find_new_threads_callback): Add debug output.
6172
20ba1ce6
PA
61732015-02-04 Pedro Alves <palves@redhat.com>
6174
6175 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6176 (resume_stopped_resumed_lwps): New function.
6177 (linux_wait_for_event_filtered): Use it.
6178
8cc73a39
SDJ
61792015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6180
6181 * Makefile.in (SFILES): Add linux-personality.c.
6182 (linux-personality.o): New rule.
6183 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6184 list of objects to be built.
6185 * linux-low.c: Include nat/linux-personality.h.
6186 (linux_create_inferior): Remove code to disable address space
6187 randomization (moved to ../nat/linux-personality.c). Create
6188 cleanup to disable address space randomization.
6189
fb23d554
SDJ
61902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6191
6192 * Makefile.in (posix-strerror.o): New rule.
6193 (mingw-strerror.o): Likewise.
6194 * configure: Regenerated.
6195 * configure.ac: Source file ../common/common.host. Initialize new
6196 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6197
cdf43629
YQ
61982015-01-14 Yao Qi <yao@codesourcery.com>
6199
6200 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6201 (ppc-linux.o): New rule.
6202 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6203 * configure.ac: AC_CHECK_FUNCS(getauxval).
6204 * config.in: Re-generated.
6205 * configure: Re-generated.
6206 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6207 ppc64_64bit_inferior_p
6208
514c5338
YQ
62092015-01-14 Yao Qi <yao@codesourcery.com>
6210
6211 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6212 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6213 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6214 (PT_ORIG_R3, PT_TRAP): Likewise.
6215 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6216 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6217 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6218
3368c1e5
JB
62192015-01-10 Joel Brobecker <brobecker@adacore.com>
6220
6221 * i387-fp.c (i387_cache_to_xsave): In look over
6222 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6223 zmmh_low_space field by use of zmmh_high_space.
6224
582511be
PA
62252015-01-09 Pedro Alves <palves@redhat.com>
6226
6227 * linux-low.c (step_over_bkpt): Move higher up in the file.
6228 (handle_extended_wait): Don't store the stop_pc here.
6229 (get_stop_pc): Adjust comments and rename to ...
6230 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6231 stopped for a software breakpoint or hardware breakpoint.
6232 (thread_still_has_status_pending_p): New function.
6233 (status_pending_p_callback): Use
6234 thread_still_has_status_pending_p. If the event is no longer
6235 interesting, resume the LWP.
6236 (handle_tracepoints): Add assert.
6237 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6238 (wstatus_maybe_breakpoint): New function.
6239 (cancel_breakpoint): Delete function.
6240 (check_stopped_by_watchpoint): New function, factored out from
6241 linux_low_filter_event.
6242 (lp_status_maybe_breakpoint): Delete function.
6243 (linux_low_filter_event): Remove filter_ptid argument.
6244 Leave thread group exits pending here. Store the LWP's stop PC.
6245 Always leave events pending.
6246 (linux_wait_for_event_filtered): Pull all events out of the
6247 kernel, and leave them all pending.
6248 (count_events_callback, select_event_lwp_callback): Consider all
6249 events.
6250 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6251 (select_event_lwp): Only give preference to the stepping LWP in
6252 all-stop mode. Adjust comments.
6253 (ignore_event): New function.
6254 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6255 references to cancel_breakpoints. Adjust to renames. Also give
6256 equal priority to all LWPs that have had events in non-stop mode.
6257 If reporting a software breakpoint event, unadjust the LWP's PC.
6258 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6259 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6260 Adjust.
6261 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6262 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6263 (linux_stopped_by_watchpoint): Adjust.
6264 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6265 * linux-low.h (enum lwp_stop_reason): New.
6266 (struct lwp_info) <stop_pc>: Adjust comment.
6267 <stopped_by_watchpoint>: Delete field.
6268 <stop_reason>: New field.
6269 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6270 * mem-break.c (software_breakpoint_inserted_here)
6271 (hardware_breakpoint_inserted_here): New function.
6272 * mem-break.h (software_breakpoint_inserted_here)
6273 (hardware_breakpoint_inserted_here): Declare.
6274 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6275 (cancel_breakpoints): Delete.
6276 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6277 (upload_fast_traceframes): Remove references to
6278 cancel_breakpoints.
6279
a33e3959
PA
62802015-01-09 Pedro Alves <palves@redhat.com>
6281
6282 * thread-db.c (find_new_threads_callback): Ignore thread if the
6283 kernel thread ID is -1.
6284
8784d563
PA
62852015-01-09 Pedro Alves <palves@redhat.com>
6286
6287 * linux-low.c (linux_attach_fail_reason_string): Move to
6288 nat/linux-ptrace.c, and rename.
6289 (linux_attach_lwp): Update comment.
6290 (attach_proc_task_lwp_callback): New function.
6291 (linux_attach): Adjust to rename and use
6292 linux_proc_attach_tgid_threads.
6293 (linux_attach_fail_reason_string): Delete declaration.
6294
76f2b779
JB
62952015-01-01 Joel Brobecker <brobecker@adacore.com>
6296
6297 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6298 * server.c (gdbserver_version): Likewise.
6299
fafcc06a
SDJ
63002014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6301
6302 * remote-utils.c: Include ctype.h.
6303 (input_interrupt): Explicitly handle the case when the char
6304 received is the NUL byte. Improve the printing of non-ASCII
6305 characters.
6306
beed38b8
JB
63072014-12-16 Joel Brobecker <brobecker@adacore.com>
6308
6309 * linux-low.c (linux_low_filter_event): Update call to
6310 linux_enable_event_reporting following the addition of
6311 a new parameter to that function.
6312
bf330350
CU
63132014-12-16 Catalin Udma <catalin.udma@freescale.com>
6314
6315 PR server/17457
6316 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6317 (AARCH64_FPCR_REGNO): Likewise.
6318 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6319 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6320 (aarch64_store_fpregset): Likewise.
6321
5227d625
JB
63222014-12-15 Joel Brobecker <brobecker@adacore.com>
6323
6324 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6325 Remove FIXME comment about assumption about N.
6326
f93b65a0
JB
63272014-12-13 Joel Brobecker <brobecker@adacore.com>
6328
6329 * configure.ac: If large-file support is disabled in GDBserver,
6330 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6331 * configure: Regenerate.
6332
e5a9158d
AA
63332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6334
6335 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6336 warning upon ENODATA from ptrace.
6337 * linux-s390-low.c (s390_store_tdb): New.
6338 (s390_regsets): Add regset for NT_S390_TDB.
6339
feea5f36
AA
63402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6341
6342 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6343 without a fill_function.
6344 * linux-s390-low.c (s390_fill_last_break): Remove.
6345 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6346 (s390_arch_setup): Use regset's size instead of fill_function for
6347 loop end condition.
6348
098dbe61
AA
63492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6350
6351 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6352 the regset's store function when ptrace returned an error.
6353 * regcache.c (get_thread_regcache): Invalidate register cache
6354 before fetching inferior's registers.
6355
28eef672
AA
63562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6357
6358 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6359 while-loop as for-loop.
6360 (regsets_store_inferior_registers): Likewise.
6361
bdca27a2
YQ
63622014-11-28 Yao Qi <yao@codesourcery.com>
6363
6364 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6365 * config.in, configure: Re-generate.
6366 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6367 is defined.
6368
9c232dda
YQ
63692014-11-21 Yao Qi <yao@codesourcery.com>
6370
6371 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6372 (AC_CHECK_HEADERS): Remove malloc.h.
6373 * configure: Re-generated.
6374 * config.in: Re-generated.
6375 * server.h: Don't include alloca.h and malloc.h.
6376 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6377 Don't include malloc.h.
6378
43968415
JB
63792014-11-17 Joel Brobecker <brobecker@adacore.com>
6380
6381 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6382 corresponding ERRNO check in same block.
6383
40e91bc7
PA
63842014-11-12 Pedro Alves <palves@redhat.com>
6385
6386 * server.c (cont_thread): Update comment.
6387 (start_inferior, attach_inferior): No longer clear cont_thread.
6388 (handle_v_cont): No longer set cont_thread.
6389 (captured_main): Clear cont_thread each time a GDB connects.
6390
c2c118cf
PA
63912014-11-12 Pedro Alves <palves@redhat.com>
6392
6393 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6394 thread, and don't resume all threads if the Hc thread has exited.
6395
78708b7c
PA
63962014-11-12 Pedro Alves <palves@redhat.com>
6397
6398 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6399 the process group instead of to a specific LWP.
6400
a2abc7de
PA
64012014-10-15 Pedro Alves <palves@redhat.com>
6402
6403 PR server/17487
6404 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6405 parameter.
6406 (arm_set_thread_context): Delete.
6407 (the_low_target): Adjust.
6408 * win32-i386-low.c (debug_registers_changed)
6409 (debug_registers_used): Delete.
6410 (update_debug_registers_callback): New function.
6411 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6412 needing to update their debug registers.
6413 (win32_get_current_dr): New function.
6414 (x86_dr_low_get_addr, x86_dr_low_get_control)
6415 (x86_dr_low_get_status): Fetch the debug register from the thread
6416 record's context.
6417 (i386_initial_stuff): Adjust.
6418 (i386_get_thread_context): Remove current_event parameter. Don't
6419 clear debug_registers_changed nor copy DR values to
6420 debug_reg_state.
6421 (i386_set_thread_context): Delete.
6422 (i386_prepare_to_resume): New function.
6423 (i386_thread_added): Mark the thread as needing to update irs
6424 debug registers.
6425 (the_low_target): Remove i386_set_thread_context and install
6426 i386_prepare_to_resume.
6427 * win32-low.c (win32_get_thread_context): Adjust.
6428 (win32_set_thread_context): Use SetThreadContext
6429 directly.
6430 (win32_prepare_to_resume): New function.
6431 (win32_require_context): New function, factored out from ...
6432 (thread_rec): ... this.
6433 (continue_one_thread): Call win32_prepare_to_resume on each thread
6434 we're about to continue.
6435 (win32_resume): Call win32_prepare_to_resume on the event thread.
6436 * win32-low.h (struct win32_thread_info)
6437 <debug_registers_changed>: New field.
6438 (struct win32_target_ops): Change prototype of set_thread_context,
6439 delete set_thread_context and add prepare_to_resume.
6440 (win32_require_context): New declaration.
6441
a442d071
GB
64422014-10-08 Gary Benson <gbenson@redhat.com>
6443
6444 * server.h: Do not include common-exceptions.h.
6445
6f1947e8
GB
64462014-10-08 Gary Benson <gbenson@redhat.com>
6447
6448 * server.h: Do not include cleanups.h.
6449
63b434a4
JH
64502014-09-30 James Hogan <james.hogan@imgtec.com>
6451
6452 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6453 mips64-dsp-linux.c.
6454
c4d9ceb6
YQ
64552014-09-23 Yao Qi <yao@codesourcery.com>
6456
6457 * linux-low.c (lp_status_maybe_breakpoint): New function.
6458 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6459 (count_events_callback): Likewise.
6460 (select_event_lwp_callback): Likewise.
6461 (cancel_breakpoints_callback): Likewise.
6462
89a5711c
DB
64632014-09-19 Don Breazeal <donb@codesourcery.com>
6464
6465 * linux-low.c (handle_extended_wait): Call
6466 linux_ptrace_get_extended_event.
6467 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6468 linux_is_extended_waitstatus.
6469
bffc0964
JB
64702014-09-16 Joel Brobecker <brobecker@adacore.com>
6471
6472 * Makefile.in (CPPFLAGS): Define.
6473 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6474 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6475
0bfdf32f
GB
64762014-09-16 Gary Benson <gbenson@redhat.com>
6477
6478 * inferiors.h (current_inferior): Renamed as...
6479 (current_thread): New variable. All uses updated.
6480 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6481 (maybe_move_out_of_jump_pad): Likewise.
6482 (cancel_breakpoint): Likewise.
6483 (linux_low_filter_event): Likewise.
6484 (wait_for_sigstop): Likewise.
6485 (linux_resume_one_lwp): Likewise.
6486 (need_step_over_p): Likewise.
6487 (start_step_over): Likewise.
6488 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6489 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6490 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6491 and save_inferior as saved_thread.
6492 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6493 saved_thread.
6494 (regcache_invalidate_thread): Likewise.
6495 * remote-utils.c (prepare_resume_reply): Likewise.
6496 * thread-db.c (thread_db_get_tls_address): Likewise.
6497 (disable_thread_event_reporting): Likewise.
6498 (remove_thread_event_breakpoints): Likewise.
6499 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6500 as saved_thread.
6501 * target.h (set_desired_inferior): Renamed as...
6502 (set_desired_thread): New declaration. All uses updated.
6503 * server.c (myresume): Updated comment to reference thread instead
6504 of inferior.
6505 (handle_serial_event): Likewise.
6506 (handle_target_event): Likewise.
6507
361c8ade
GB
65082014-09-12 Tom Tromey <tromey@redhat.com>
6509 Gary Benson <gbenson@redhat.com>
6510
6511 * regcache.h: Include common-regcache.h.
6512 (regcache_read_pc): Don't declare.
6513 * regcache.c (get_thread_regcache_for_ptid): New function.
6514
bd9269f7
GB
65152014-09-11 Tom Tromey <tromey@redhat.com>
6516 Gary Benson <gbenson@redhat.com>
6517
6518 * symbol.c: New file.
6519 * Makefile.in (SFILES): Add symbol.c.
6520 (OBS): Add symbol.o.
6521
f8c1d06b
GB
65222014-09-11 Gary Benson <gbenson@redhat.com>
6523
6524 * target.c (target_stop_ptid, target_continue_ptid): New
6525 functions.
6526
721ec300
GB
65272014-09-11 Tom Tromey <tromey@redhat.com>
6528 Gary Benson <gbenson@redhat.com>
6529
6530 * target.h: Include target/target.h.
6531 * target.c (target_read_memory, target_read_uint32)
6532 (target_write_memory): New functions.
6533
c5e92cca
GB
65342014-09-11 Gary Benson <gbenson@redhat.com>
6535
6536 * server.h (debug_hw_points): Don't declare.
6537 * server.c (debug_hw_points): Don't define. Replace all uses
6538 with show_debug_regs.
6539 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6540 all uses with show_debug_regs.
6541
2e4bb98a
EBM
65422014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6543
6544 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6545 endianness into account.
6546 (ppc_supply_ptrace_register): Likewise.
6547
ac740bc7
JH
65482014-09-03 James Hogan <james.hogan@imgtec.com>
6549
6550 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6551 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6552
97ea6506
GB
65532014-09-03 Gary Benson <gbenson@redhat.com>
6554
6555 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6556 ALL_DEBUG_ADDRESS_REGISTERS.
6557
df7e5265
GB
65582014-09-02 Gary Benson <gbenson@redhat.com>
6559
6560 * i386-low.h: Renamed as...
6561 * x86-low.h: New file. All type, function and variable name
6562 prefixes changed from "i386_" to "x86_". All references updated.
6563 * i386-low.c: Renamed as...
6564 * x86-low.c: New file. All type, function and variable name
6565 prefixes changed from "i386_" to "x86_". All references updated.
6566
ed859da7
GB
65672014-09-02 Gary Benson <gbenson@redhat.com>
6568
6569 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6570 (x86_linux_new_thread): Likewise.
6571
860789c7
GB
65722014-08-29 Gary Benson <gbenson@redhat.com>
6573
6574 * server.h (setjmp.h): Do not include.
6575 (toplevel): Do not declare.
6576 (common-exceptions.h): Include.
6577 (cleanups.h): Likewise.
6578 * server.c (toplevel): Do not define.
6579 (exit_code): New static global.
6580 (detach_or_kill_for_exit_cleanup): New function.
6581 (main): New function. Original main renamed to...
6582 (captured_main): New function.
6583 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6584
ff55e1b5
GB
65852014-08-29 Gary Benson <gbenson@redhat.com>
6586
6587 * Makefile.in (SFILES): Add common/common-exceptions.c.
6588 (OBS): Add common-exceptions.o.
6589 (common-exceptions.o): New rule.
6590 * utils.c (prepare_to_throw_exception): New function.
6591
e9bcb658
GB
65922014-08-29 Gary Benson <gbenson@redhat.com>
6593
6594 * config.in: Regenerate.
6595 * configure: Likewise.
6596
e3180625
GB
65972014-08-29 Gary Benson <gbenson@redhat.com>
6598
6599 * Makefile.in (SFILES): Add common/cleanups.c.
6600 (OBS): cleanups.o.
6601 (cleanups.o): New rule.
6602
e3d6ba5d
GB
66032014-08-29 Gary Benson <gbenson@redhat.com>
6604
6605 * utils.c (internal_vwarning): New function.
6606
7096e886
GB
66072014-08-28 Gary Benson <gbenson@redhat.com>
6608
6609 * utils.h (fatal): Remove declaration.
6610 * utils.c (fatal): Remove function.
6611
14ce3192
GB
66122014-08-28 Gary Benson <gbenson@redhat.com>
6613
6614 * tracepoint.c (gdb_agent_init): Replace fatal with
6615 perror_with_name.
6616 (initialize_tracepoint): Likewise.
6617
50278d59
GB
66182014-08-28 Gary Benson <gbenson@redhat.com>
6619
6620 * remote-utils.c (remote_prepare): Replace fatal with error.
6621
aa96c426
GB
66222014-08-28 Gary Benson <gbenson@redhat.com>
6623
6624 * linux-low.c (linux_async): Replace fatal with warning.
6625 Tidy up and return.
6626 (linux_start_non_stop): Return -1 if linux_async failed.
6627
f7160e97
GB
66282014-08-28 Gary Benson <gbenson@redhat.com>
6629
6630 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6631 gdb_assert.
6632 (i386_dr_low_get_addr): Remove vague comment.
6633 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6634 gdb_assert.
6635
38e08fca
GB
66362014-08-28 Gary Benson <gbenson@redhat.com>
6637
6638 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6639 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6640 internal_error.
6641 (linux_resume_one_lwp): Likewise.
6642 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6643 gdb_assert.
6644 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6645 with internal_error.
6646 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6647 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6648 (find_register_by_name): Replace fatal with internal_error.
6649 (find_regno): Likewise.
6650 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6651 * thread-db.c (thread_db_create_event): Likewise.
6652 (thread_db_load_search): Likewise.
6653 (try_thread_db_load_1): Likewise.
6654 * tracepoint.c (get_jump_space_head): Replace fatal with
6655 internal_error.
6656 (claim_trampoline_space): Likewise.
6657 (have_fast_tracepoint_trampoline_buffer): Likewise.
6658 (cmd_qtstart): Likewise.
6659 (stop_tracing): Likewise.
6660 (fast_tracepoint_collecting): Likewise.
6661 (target_malloc): Likewise.
6662 (download_tracepoint): Likewise.
6663 (download_trace_state_variables): Replace check with gdb_assert.
6664 (upload_fast_traceframes): Replace fatal with internal_error.
6665
34abf635
GB
66662014-08-19 Tom Tromey <tromey@redhat.com>
6667 Gary Benson <gbenson@redhat.com>
6668
6669 * Makefile.in (SFILES): Add common/common-debug.c.
6670 (OBS): Add common-debug.o.
6671 (common-debug.o): New rule.
6672 * debug.h (debug_printf): Don't declare.
6673 * debug.c (debug_printf): Renamed and rewritten as...
6674 (debug_vprintf): New function.
6675
f6e94d78
GB
66762014-08-19 Gary Benson <gbenson@redhat.com>
6677
6678 * utils.h: Do not include print-utils.h.
6679
9239eeab
GB
66802014-08-19 Tom Tromey <tromey@redhat.com>
6681 Gary Benson <gbenson@redhat.com>
6682
6683 * server.h: Add static assertion.
6684 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6685
ef87c8bb
GB
66862014-08-19 Tom Tromey <tromey@redhat.com>
6687 Gary Benson <gbenson@redhat.com>
6688
6689 * Makefile.in (SFILES): Add common/errors.c.
6690 (OBS): Add errors.o.
6691 (IPA_OBS): Add errors-ipa.o.
6692 (errors.o): New rule.
6693 (errors-ipa.o): Likewise.
6694 * utils.h (perror_with_name, error, warning): Don't declare.
6695 * utils.c (warning): Renamed and rewritten as...
6696 (vwarning): New function.
6697 (error): Renamed and rewritten as...
6698 (verror): New function.
6699 (internal_error): Renamed and rewritten as...
6700 (internal_verror): New function.
6701
bb974a24
GB
67022014-08-07 Gary Benson <gbenson@redhat.com>
6703
6704 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6705 * configure: Regenerate.
6706 * config.in: Likewise.
6707 * server.h: Do not include errno.h.
6708 * event-loop.c: Likewise.
6709 * hostio-errno.c: Likewise.
6710 * linux-low.c: Likewise.
6711 * remote-utils.c: Likewise.
6712 * spu-low.c: Likewise.
6713 * utils.c: Likewise.
6714 * gdbreplay.c: Unconditionally include errno.h.
6715
6d3d12eb
GB
67162014-08-07 Gary Benson <gbenson@redhat.com>
6717
6718 * server.h: Do not include string.h.
6719 * event-loop.c: Likewise.
6720 * linux-low.c: Likewise.
6721 * regcache.c: Likewise.
6722 * remote-utils.c: Likewise.
6723 * spu-low.c: Likewise.
6724 * utils.c: Likewise.
6725
dccbb609
GB
67262014-08-07 Gary Benson <gbenson@redhat.com>
6727
6728 * server.h: Do not include gdb_assert.h.
6729
e76df0d0
GB
67302014-08-07 Gary Benson <gbenson@redhat.com>
6731
6732 * server.h: Do not include common-utils.h.
6733
4cb9c816
GB
67342014-08-07 Gary Benson <gbenson@redhat.com>
6735
6736 * server.h: Do not include ptid.h.
6737 * notif.h: Likewise.
6738
3995eeee
GB
67392014-08-07 Gary Benson <gbenson@redhat.com>
6740
6741 * server.h: Do not include gdb_locale.h.
6742
cb9f1a9b
GB
67432014-08-07 Gary Benson <gbenson@redhat.com>
6744
6745 * server.h: Do not include gdb/signals.h.
6746 * win32-low.c: Likewise.
6747
a5fceff8
GB
67482014-08-07 Gary Benson <gbenson@redhat.com>
6749
6750 * server.h: Do not include pathmax.h.
6751
b9391142
GB
67522014-08-07 Gary Benson <gbenson@redhat.com>
6753
6754 * server.h: Do not include libiberty.h.
6755 * linux-bfin-low.c: Likewise.
6756
0e443c87
GB
67572014-08-07 Gary Benson <gbenson@redhat.com>
6758
6759 * server.h: Do not include ansidecl.h.
6760
8ebb3f56
GB
67612014-08-07 Gary Benson <gbenson@redhat.com>
6762
6763 * linux-x86-low.c: Do not include stddef.h.
6764 * lynx-ppc-low.c: Likewise.
6765 * tracepoint.c: Likewise.
6766
8980bdf6
GB
67672014-08-07 Gary Benson <gbenson@redhat.com>
6768
6769 * server.h: Do not include stdarg.h.
6770 * nto-low.c: Likewise.
6771
d7096f71
GB
67722014-08-07 Gary Benson <gbenson@redhat.com>
6773
6774 * server.h: Do not include stdlib.h.
6775 * inferiors.c: Likewise.
6776 * linux-low.c: Likewise.
6777 * regcache.c: Likewise.
6778 * spu-low.c: Likewise.
6779 * tracepoint.c: Likewise.
6780 * utils.c: Likewise.
6781
d02f550d
GB
67822014-08-07 Gary Benson <gbenson@redhat.com>
6783
6784 * server.h: Do not include stdio.h.
6785 * linux-low.c: Likewise.
6786 * remote-utils.c: Likewise.
6787 * spu-low.c: Likewise.
6788 * utils.c: Likewise.
6789 * wincecompat.c: Likewise.
6790
87f6c4e3
GB
67912014-08-06 Gary Benson <gbenson@redhat.com>
6792
6793 * regcache.c (init_register_cache): Move conditionals inside if.
6794
7089dca4
GB
67952014-08-06 Gary Benson <gbenson@redhat.com>
6796
6797 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6798
462f517e
GB
67992014-07-31 Gary Benson <gbenson@redhat.com>
6800
6801 * ax.h: Do not include server.h.
6802 * gdbthread.h: Likewise.
6803 * lynx-low.h: Likewise.
6804 * notif.h: Likewise.
6805
976411d6
GB
68062014-07-30 Gary Benson <gbenson@redhat.com>
6807
6808 * server.h: Include common-defs.h.
6809 Do not include config.h or build-gnulib-gdbserver/config.h.
6810
d41f6d8e
GB
68112014-07-30 Gary Benson <gbenson@redhat.com>
6812
6813 * hostio-errno.c: Move server.h to top of includes list.
6814 * inferiors.c: Likewise.
6815 * linux-x86-low.c: Likewise.
6816 * notif.c: Include server.h.
6817
314c6a35
TT
68182014-07-24 Tom Tromey <tromey@redhat.com>
6819 Gary Benson <gbenson@redhat.com>
6820
6821 * server.h (CORE_ADDR): Now unsigned.
6822
69ff6be5
PA
68232014-07-16 Pedro Alves <palves@redhat.com>
6824
6825 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6826
ce9e3fe7
PA
68272014-07-15 Pedro Alves <palves@redhat.com>
6828
6829 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6830 copy.
6831
e76126e8
PA
68322014-07-11 Pedro Alves <palves@redhat.com>
6833
6834 * linux-low.c (kill_wait_lwp): New function, based on
6835 kill_one_lwp_callback, but use my_waitpid directly.
6836 (kill_one_lwp_callback, linux_kill): Use it.
6837
8e9db26e
PA
68382014-06-23 Pedro Alves <palves@redhat.com>
6839
6840 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6841 before setting DR0..DR3.
6842
698b3e08
GB
68432014-06-20 Gary Benson <gbenson@redhat.com>
6844
6845 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6846 * configure: Regenerated.
6847 * config.in: Likewise.
6848
125f8a3d
GB
68492014-06-20 Gary Benson <gbenson@redhat.com>
6850
6851 * Makefile.in (SFILES): Update locations for files moved
6852 from common to nat.
6853 (object file files): Reordered.
6854
42995dbd
GB
68552014-06-20 Gary Benson <gbenson@redhat.com>
6856
6857 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6858 (i386_dr_low_set_addr): Likewise.
6859 (i386_dr_low_get_addr): Likewise.
6860 (i386_dr_low_can_set_control): Likewise.
6861 (i386_dr_low_set_control): Likewise.
6862 (i386_dr_low_get_control): Likewise.
6863 (i386_dr_low_get_status): Likewise.
6864 (i386_get_debug_register_length): Likewise.
6865 * linux-x86-low.c (i386_dr_low_set_addr):
6866 Changed signature. Made static.
6867 (i386_dr_low_get_addr): Likewise.
6868 (i386_dr_low_set_control): Likewise.
6869 (i386_dr_low_get_control): Likewise.
6870 (i386_dr_low_get_status): Likewise.
6871 (i386_dr_low): New global variable.
6872 * win32-i386-low.c (i386_dr_low_set_addr):
6873 Changed signature. Made static.
6874 (i386_dr_low_get_addr): Likewise.
6875 (i386_dr_low_set_control): Likewise.
6876 (i386_dr_low_get_control): Likewise.
6877 (i386_dr_low_get_status): Likewise.
6878 (i386_dr_low): New global variable.
6879
e1d2394b
MS
68802014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6881
6882 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6883 * Makefile.in (AR, AR_FLAGS): Define.
6884 * configure: Regenerate.
6885
3a8ee006
GB
68862014-06-19 Gary Benson <gbenson@redhat.com>
6887
6888 * Makefile.in (i386-dregs.o): New rule.
6889 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6890 * i386-low.c (target.h): Remove include.
6891 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6892 (DR_CONTROL_SHIFT): Likewise.
6893 (DR_CONTROL_SIZE): Likewise.
6894 (DR_RW_EXECUTE): Likewise.
6895 (DR_RW_WRITE): Likewise.
6896 (DR_RW_READ): Likewise.
6897 (DR_RW_IORW): Likewise.
6898 (DR_LEN_1): Likewise.
6899 (DR_LEN_2): Likewise.
6900 (DR_LEN_4): Likewise.
6901 (DR_LEN_8): Likewise.
6902 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6903 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6904 (DR_ENABLE_SIZE): Likewise.
6905 (DR_LOCAL_SLOWDOWN): Likewise.
6906 (DR_GLOBAL_SLOWDOWN): Likewise.
6907 (DR_CONTROL_RESERVED): Likewise.
6908 (I386_DR_CONTROL_MASK): Likewise.
6909 (I386_DR_VACANT): Likewise.
6910 (I386_DR_LOCAL_ENABLE): Likewise.
6911 (I386_DR_GLOBAL_ENABLE): Likewise.
6912 (I386_DR_DISABLE): Likewise.
6913 (I386_DR_SET_RW_LEN): Likewise.
6914 (I386_DR_GET_RW_LEN): Likewise.
6915 (I386_DR_WATCH_HIT): Likewise.
6916 (i386_wp_op_t): Likewise.
6917 (i386_show_dr): Likewise.
6918 (i386_length_and_rw_bits): Likewise.
6919 (i386_insert_aligned_watchpoint): Likewise.
6920 (i386_remove_aligned_watchpoint): Likewise.
6921 (i386_handle_nonaligned_watchpoint): Likewise.
6922 i386_update_inferior_debug_regs(): Likewise.
6923 (i386_dr_insert_watchpoint): Likewise.
6924 (i386_dr_remove_watchpoint): Likewise.
6925 (i386_dr_region_ok_for_watchpoint): Likewise.
6926 (i386_dr_stopped_data_address): Likewise.
6927 (i386_dr_stopped_by_watchpoint): Likewise.
6928
8f26655c
GB
69292014-06-19 Gary Benson <gbenson@redhat.com>
6930
6931 * i386-low.c (i386_dr_show): Renamed to
6932 i386_show_dr and made static. All uses updated.
6933 (i386_dr_length_and_rw_bits): Renamed to
6934 i386_length_and_rw_bits and made static.
6935 All uses updated.
6936 (i386_dr_insert_aligned_watchpoint): Renamed to
6937 i386_insert_aligned_watchpoint and made static.
6938 All uses updated.
6939 (i386_dr_remove_aligned_watchpoint): Renamed to
6940 i386_remove_aligned_watchpoint and made static.
6941 All uses updated.
6942 (i386_dr_update_inferior_debug_regs): Renamed to
6943 i386_update_inferior_debug_regs and made static.
6944 All uses updated.
6945
b9228891
GB
69462014-06-18 Gary Benson <gbenson@redhat.com>
6947
5171def3
GB
6948 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6949 (i386_dr_low_can_set_control): Likewise.
6950 (i386_get_debug_register_length): Likewise.
6951 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6952 (i386_dr_low_can_set_control): Likewise.
6953 (i386_get_debug_register_length): Likewise.
6954
69552014-06-17 Gary Benson <gbenson@redhat.com>
6956
b9228891
GB
6957 * i386-low.h (i386-dregs.h): New include.
6958 (DR_FIRSTADDR): Now in i386-dregs.h.
6959 (DR_LASTADDR): Likewise.
6960 (DR_NADDR): Likewise.
6961 (DR_STATUS): Likewise.
6962 (DR_CONTROL): Likewise.
6963 (i386_debug_reg_state): Likewise.
6964 (i386_dr_insert_watchpoint): Likewise.
6965 (i386_dr_remove_watchpoint): Likewise.
6966 (i386_dr_region_ok_for_watchpoint): Likewise.
6967 (i386_dr_stopped_data_address): Likewise.
6968 (i386_dr_stopped_by_watchpoint): Likewise.
6969 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6970
4be83cc2
GB
69712014-06-18 Gary Benson <gbenson@redhat.com>
6972
6973 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6974 i386_dr_insert_watchpoint.
6975 (i386_low_remove_watchpoint): Renamed to
6976 i386_dr_remove_watchpoint.
6977 (i386_low_region_ok_for_watchpoint): Renamed to
6978 i386_dr_region_ok_for_watchpoint.
6979 (i386_low_stopped_data_address): Renamed to
6980 i386_dr_stopped_data_address.
6981 (i386_low_stopped_by_watchpoint): Renamed to
6982 i386_dr_stopped_by_watchpoint.
6983 * i386-low.c (i386_show_dr): Renamed to
6984 i386_dr_show and made nonstatic. All uses updated.
6985 (i386_length_and_rw_bits): Renamed to
6986 i386_dr_length_and_rw_bits and made nonstatic.
6987 All uses updated.
6988 (i386_insert_aligned_watchpoint): Renamed to
6989 i386_dr_insert_aligned_watchpoint and made nonstatic.
6990 All uses updated.
6991 (i386_remove_aligned_watchpoint): Renamed to
6992 i386_dr_remove_aligned_watchpoint and made nonstatic.
6993 All uses updated.
6994 (i386_update_inferior_debug_regs): Renamed to
6995 i386_dr_update_inferior_debug_regs and made nonstatic.
6996 All uses updated.
6997 (i386_low_insert_watchpoint): Renamed to
6998 i386_dr_insert_watchpoint. All uses updated.
6999 (i386_low_remove_watchpoint): Renamed to
7000 i386_dr_remove_watchpoint. All uses updated.
7001 (i386_low_region_ok_for_watchpoint): Renamed to
7002 i386_dr_region_ok_for_watchpoint. All uses updated.
7003 (i386_low_stopped_data_address): Renamed to
7004 i386_dr_stopped_data_address. All uses updated.
7005 (i386_low_stopped_by_watchpoint): Renamed to
7006 i386_dr_stopped_by_watchpoint. All uses updated.
7007
131aa0d4
GB
70082014-06-18 Gary Benson <gbenson@redhat.com>
7009
7010 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7011 (i386_dr_low_can_set_control): Likewise.
7012 (i386_insert_aligned_watchpoint): New check.
7013
d9305f7f
GB
70142014-06-18 Gary Benson <gbenson@redhat.com>
7015
7016 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7017 Renamed to state.
7018
e927c9fc
GB
70192014-06-18 Gary Benson <gbenson@redhat.com>
7020
7021 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7022 instead of fatal and error.
7023 (i386_handle_nonaligned_watchpoint): Likewise.
7024
1b6d4134
GB
70252014-06-18 Gary Benson <gbenson@redhat.com>
7026
7027 * i386-low.c (i386_get_debug_register_length): New macro.
7028 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7029 (i386_show_dr): Use debug_printf instead of fprintf. Use
7030 phex to format values.
7031
6e62758f
GB
70322014-06-18 Gary Benson <gbenson@redhat.com>
7033
7034 * i386-low.h: Comment changes.
7035 * i386-low.c: Likewise.
7036
fc6e2f03
GB
70372014-06-18 Gary Benson <gbenson@redhat.com>
7038
7039 * i386-low.c: Whitespace changes.
7040
f9d1eeed
TT
70412014-06-12 Tom Tromey <tromey@redhat.com>
7042
7043 * utils.c (freeargv): Remove.
7044
0b04e523
TT
70452014-06-12 Tom Tromey <tromey@redhat.com>
7046
7047 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7048 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7049 (parse_debug_format_options): Likewise.
7050 (gdbserver_usage): Likewise.
7051 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7052 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7053 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7054 against libiberty.
7055 ($(LIBGNU)): Depend on libiberty.
7056 (all-lib): Recurse into all subdirs.
7057 (install-only): Invoke "install" target in subdirs.
7058 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7059 targets.
7060 * configure: Rebuild.
7061 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7062 for vasprintf, vsnprintf, or gettimeofday.
7063 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7064 srv_tgtobj.
7065
270c9937
JB
70662014-06-05 Joel Brobecker <brobecker@adacore.com>
7067
7068 * development.sh: Delete.
7069 * Makefile.in (config.status): Adjust dependency on development.sh.
7070 * configure.ac: Adjust development.sh source call.
7071 * configure: Regenerate.
7072
0a261ed8
PA
70732014-06-02 Pedro Alves <palves@redhat.com>
7074
7075 * ax.c (gdb_free_agent_expr): New function.
7076 * ax.h (gdb_free_agent_expr): New declaration.
7077 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7078 list.
7079 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7080 static.
7081 (clear_breakpoint_conditions_and_commands): New function.
7082 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7083 (clear_breakpoint_conditions_and_commands): New declaration.
7084
e9dae05e
RR
70852014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7086
7087 * linux-aarch64-low.c (asm/ptrace.h): Include.
7088
5876f503
JK
70892014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7090
7091 Fix TLS access for -static -pthread.
7092 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7093 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7094 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7095
802e8e6d
PA
70962014-05-20 Pedro Alves <palves@redhat.com>
7097
7098 * linux-aarch64-low.c (aarch64_insert_point)
7099 (aarch64_remove_point): No longer check whether the type is
7100 supported here. Adjust to new interface.
7101 (the_low_target): Install aarch64_supports_z_point_type as
7102 supports_z_point_type method.
7103 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7104 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7105 instead of a Z packet char. Adjust.
7106 (arm_supports_z_point_type): New function.
7107 (arm_insert_point, arm_remove_point): Adjust to new interface.
7108 (the_low_target): Install arm_supports_z_point_type.
7109 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7110 (cris_insert_point, cris_remove_point): Adjust to new interface.
7111 Don't check whether the type is supported here.
7112 (the_low_target): Install cris_supports_z_point_type.
7113 * linux-low.c (linux_supports_z_point_type): New function.
7114 (linux_insert_point, linux_remove_point): Adjust to new interface.
7115 * linux-low.h (struct linux_target_ops) <insert_point,
7116 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7117 raw_breakpoint pointer parameter.
7118 <supports_z_point_type>: New method.
7119 * linux-mips-low.c (mips_supports_z_point_type): New function.
7120 (mips_insert_point, mips_remove_point): Adjust to new interface.
7121 Use mips_supports_z_point_type.
7122 (the_low_target): Install mips_supports_z_point_type.
7123 * linux-ppc-low.c (the_low_target): Install NULL as
7124 supports_z_point_type method.
7125 * linux-s390-low.c (the_low_target): Install NULL as
7126 supports_z_point_type method.
7127 * linux-sparc-low.c (the_low_target): Install NULL as
7128 supports_z_point_type method.
7129 * linux-x86-low.c (x86_supports_z_point_type): New function.
7130 (x86_insert_point): Adjust to new insert_point interface. Use
7131 insert_memory_breakpoint. Adjust to new
7132 i386_low_insert_watchpoint interface.
7133 (x86_remove_point): Adjust to remove_point interface. Use
7134 remove_memory_breakpoint. Adjust to new
7135 i386_low_remove_watchpoint interface.
7136 (the_low_target): Install x86_supports_z_point_type.
7137 * lynx-low.c (lynx_target_ops): Install NULL as
7138 supports_z_point_type callback.
7139 * nto-low.c (nto_supports_z_point_type): New.
7140 (nto_insert_point, nto_remove_point): Adjust to new interface.
7141 (nto_target_ops): Install nto_supports_z_point_type.
7142 * mem-break.c: Adjust intro comment.
7143 (struct raw_breakpoint) <raw_type, size>: New fields.
7144 <inserted>: Update comment.
7145 <shlib_disabled>: Delete field.
7146 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7147 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7148 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7149 (raw_bkpt_type_to_target_hw_bp_type): New function.
7150 (find_enabled_raw_code_breakpoint_at): New function.
7151 (find_raw_breakpoint_at): New type and size parameters. Use them.
7152 (insert_memory_breakpoint): New function, based off
7153 set_raw_breakpoint_at.
7154 (remove_memory_breakpoint): New function.
7155 (set_raw_breakpoint_at): Reimplement.
7156 (set_breakpoint): New, based on set_breakpoint_at.
7157 (set_breakpoint_at): Reimplement.
7158 (delete_raw_breakpoint): Go through the_target->remove_point
7159 instead of assuming memory breakpoints.
7160 (find_gdb_breakpoint_at): Delete.
7161 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7162 (find_gdb_breakpoint): New function.
7163 (set_gdb_breakpoint_at): Delete.
7164 (z_type_supported): New function.
7165 (set_gdb_breakpoint_1): New function, loosely based off
7166 set_gdb_breakpoint_at.
7167 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7168 (delete_gdb_breakpoint_at): Delete.
7169 (delete_gdb_breakpoint_1): New function, loosely based off
7170 delete_gdb_breakpoint_at.
7171 (delete_gdb_breakpoint): New function.
7172 (clear_gdb_breakpoint_conditions): Rename to ...
7173 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7174 breakpoint.
7175 (add_condition_to_breakpoint): Make static.
7176 (add_breakpoint_condition): Take a struct breakpoint pointer
7177 instead of an address. Adjust.
7178 (gdb_condition_true_at_breakpoint): Rename to ...
7179 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7180 z_type parameter.
7181 (gdb_condition_true_at_breakpoint): Reimplement.
7182 (add_breakpoint_commands): Take a struct breakpoint pointer
7183 instead of an address. Adjust.
7184 (gdb_no_commands_at_breakpoint): Rename to ...
7185 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7186 parameter. Return true if no breakpoint was found. Change debug
7187 output.
7188 (gdb_no_commands_at_breakpoint): Reimplement.
7189 (run_breakpoint_commands): Rename to ...
7190 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7191 and change return type to boolean.
7192 (run_breakpoint_commands): New function.
7193 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7194 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7195 breakpoint. Go through the_target->remove_point instead of
7196 assuming memory breakpoint.
7197 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7198 software and hardware breakpoints.
7199 (reinsert_raw_breakpoint): Go through the_target->insert_point
7200 instead of assuming memory breakpoint.
7201 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7202 software and hardware breakpoints.
7203 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7204 Check both software and hardware breakpoints.
7205 (validate_inserted_breakpoint): Assert the breakpoint is a
7206 software breakpoint. Set the inserted flag to -1 instead of
7207 setting shlib_disabled.
7208 (delete_disabled_breakpoints): Adjust.
7209 (validate_breakpoints): Only validate software breakpoints.
7210 Adjust to inserted flag change.
7211 (check_mem_read, check_mem_write): Skip breakpoint types other
7212 than software breakpoints. Adjust to inserted flag change.
7213 * mem-break.h (enum raw_bkpt_type): New enum.
7214 (raw_breakpoint, struct process_info): Forward declare.
7215 (Z_packet_to_target_hw_bp_type): Delete declaration.
7216 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7217 (set_gdb_breakpoint, delete_gdb_breakpoint)
7218 (clear_breakpoint_conditions): New declarations.
7219 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7220 (breakpoint_inserted_here): Update comment.
7221 (add_breakpoint_condition, add_breakpoint_commands): Replace
7222 address parameter with a breakpoint pointer parameter.
7223 (gdb_breakpoint_here): Update comment.
7224 (delete_gdb_breakpoint_at): Delete.
7225 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7226 * server.c (process_point_options): Take a struct breakpoint
7227 pointer instead of an address. Adjust.
7228 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7229 delete_gdb_breakpoint.
7230 * spu-low.c (spu_target_ops): Install NULL as
7231 supports_z_point_type method.
7232 * target.h: Include mem-break.h.
7233 (struct target_ops) <prepare_to_access_memory>: Update comment.
7234 <supports_z_point_type>: New field.
7235 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7236 instead of a char. Also take a raw breakpoint pointer.
7237 * win32-arm-low.c (the_low_target): Install NULL as
7238 supports_z_point_type.
7239 * win32-i386-low.c (i386_supports_z_point_type): New function.
7240 (i386_insert_point, i386_remove_point): Adjust to new interface.
7241 (the_low_target): Install i386_supports_z_point_type.
7242 * win32-low.c (win32_supports_z_point_type): New function.
7243 (win32_insert_point, win32_remove_point): Adjust to new interface.
7244 (win32_target_ops): Install win32_supports_z_point_type.
7245 * win32-low.h (struct win32_target_ops):
7246 <supports_z_point_type>: New method.
7247 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7248 instead of a char. Also take a raw breakpoint pointer.
7249
932539e3
PA
72502014-05-20 Pedro Alves <palves@redhat.com>
7251
7252 * mem-break.h: Include break-common.h.
7253 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7254 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7255 (Z_packet_to_target_hw_bp_type): New declaration.
7256 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7257 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7258 (Z_PACKET_ACCESS_WP): Delete macros.
7259 (Z_packet_to_hw_type): Delete function.
7260 * i386-low.h: Don't include break-common.h here.
7261 (Z_packet_to_hw_type): Delete declaration.
7262 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7263 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7264 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7265 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7266 * linux-aarch64-low.c: Don't include break-common.h here.
7267 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7268 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7269 (Z_packet_to_target_hw_bp_type): Delete function.
7270 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7271 function.
7272 (mips_insert_point, mips_remove_point): Use
7273 Z_packet_to_target_hw_bp_type.
7274
4ff0d3d8
PA
72752014-05-20 Pedro Alves <palves@redhat.com>
7276
7277 * linux-aarch64-low.c: Include break-common.h.
7278 (enum target_point_type): Delete.
7279 (Z_packet_to_point_type): Rename to ...
7280 (Z_packet_to_target_hw_bp_type): ... this, and return a
7281 target_hw_bp_type instead.
7282 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7283 instead of an enum target_point_type.
7284 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7285 breakpoint type.
7286 (aarch64_dr_state_insert_one_point)
7287 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7288 (aarch64_handle_aligned_watchpoint)
7289 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7290 Take an enum target_hw_bp_type instead of an enum
7291 target_point_type.
7292 (aarch64_supports_z_point_type): New function.
7293 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7294 use Z_packet_to_target_hw_bp_type.
7295
786dc519
JB
72962014-05-20 Joel Brobecker <brobecker@adacore.com>
7297
7298 * configure.ac: Only use -Werror by default when DEVELOPMENT
7299 is true.
7300 * configure: Regenerate.
7301
9e0aa64f
JK
73022014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7303
7304 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7305 * linux-x86-low.c (X86_64_USER_REGS): New.
7306 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7307
2b577b92
YQ
73082014-04-28 Yao Qi <yao@codesourcery.com>
7309
7310 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7311 name.
7312
94611da2
PA
73132014-04-25 Pedro Alves <palves@redhat.com>
7314
7315 PR server/16255
7316 * linux-low.c (linux_attach_fail_reason_string): New function.
7317 (linux_attach_lwp): Delete.
7318 (linux_attach_lwp_1): Rename to ...
7319 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7320 argument. Remove "initial" parameter. Return int instead of
7321 void. Don't error or warn here.
7322 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7323 failure to attach to the tgid. Call warning when failing to
7324 attach to an lwp.
7325 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7326 argument. Remove "initial" parameter. Return int instead of
7327 void. Don't error or warn here.
7328 (linux_attach_fail_reason_string): New declaration.
7329 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7330 interface change. Use linux_attach_fail_reason_string.
7331
01f9f808
MS
73322014-04-24 Michael Sturm <michael.sturm@mintel.com>
7333 Walfred Tedeschi <walfred.tedeschi@intel.com>
7334
7335 * Makefile.in: Added rules to handle new files
7336 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7337 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7338 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7339 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7340 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7341 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7342 x32-avx512-linux.o.
7343 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7344 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7345 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7346 i386/x32-avx512.xml.
7347 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7348 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7349 i386/x32-avx512-linux.xml.
7350 * i387-fp.c (num_avx512_k_registers): New constant for number
7351 of K registers.
7352 (num_avx512_zmmh_low_registers): New constant for number of
7353 lower ZMM registers (0-15).
7354 (num_avx512_zmmh_high_registers): New constant for number of
7355 higher ZMM registers (16-31).
7356 (num_avx512_ymmh_registers): New contant for number of higher
7357 YMM registers (ymm16-31 added by avx521 on x86_64).
7358 (num_avx512_xmm_registers): New constant for number of higher
7359 XMM registers (xmm16-31 added by AVX512 on x86_64).
7360 (struct i387_xsave): Add space for AVX512 registers.
7361 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7362 Add code to handle AVX512 registers.
7363 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7364 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7365 prototypei from generated file.
7366 (tdesc_amd64_avx512_linux): Likewise.
7367 (init_registers_x32_avx512_linux): Likewise.
7368 (tdesc_x32_avx512_linux): Likewise.
7369 (init_registers_i386_avx512_linux): Likewise.
7370 (tdesc_i386_avx512_linux): Likewise.
7371 (x86_64_regmap): Add AVX512 registers.
7372 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7373 mask.
7374 (initialize_low_arch): Add code to initialize AVX512 registers.
7375
51aa91f9
PA
73762014-04-23 Pedro Alves <palves@redhat.com>
7377
7378 * mem-break.c (find_gdb_breakpoint_at): Make static.
7379 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7380
a4165e94
PA
73812014-04-23 Pedro Alves <palves@redhat.com>
7382
7383 * i386-low.c: Don't include break-common.h here.
7384 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7385 prototype to take target_hw_bp_type as argument instead of a Z
7386 packet char.
7387 * i386-low.h: Include break-common.h here.
7388 (Z_packet_to_hw_type): Declare.
7389 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7390 prototypes.
7391 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7392 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7393 (x86_remove_point): Convert the packet number to a
7394 target_hw_bp_type before calling i386_low_remove_watchpoint.
7395 * win32-i386-low.c (i386_insert_point): Convert the packet number
7396 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7397 (i386_remove_point): Convert the packet number to a
7398 target_hw_bp_type before calling i386_low_remove_watchpoint.
7399
b8acf843
PA
74002014-04-23 Pedro Alves <palves@redhat.com>
7401
7402 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7403
d708bcd1
PA
74042014-04-10 Pedro Alves <palves@redhat.com>
7405
7406 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7407 Check if the condition or command is NULL before checking if the
7408 breakpoint is known. On success, return true.
7409 * mem-break.h (add_breakpoint_condition): Document return.
7410 (add_breakpoint_commands): Add describing comment.
7411 * server.c (skip_to_semicolon): New function.
7412 (process_point_options): Use it.
7413
2eec7d5b
PA
74142014-04-09 Pedro Alves <palves@redhat.com>
7415
7416 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7417 to lwpid_of.
7418
fa96cb38
PA
74192014-02-27 Pedro Alves <palves@redhat.com>
7420
7421 PR 12702
7422 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7423 macros.
7424 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7425 output.
7426 (last_thread_of_process_p): Take a PID argument instead of a
7427 thread pointer.
7428 (linux_wait_for_lwp): Delete.
7429 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7430 functions.
7431 (linux_low_filter_event): New function, party factored out from
7432 linux_wait_for_event.
7433 (linux_wait_for_event): Rename to ...
7434 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7435 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7436 sigsuspend. Check for zombie leaders.
7437 (linux_wait_for_event): Reimplement as wrapper around
7438 linux_wait_for_event_filtered.
7439 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7440 a normal or signal exit is seen, it's the whole process exiting.
7441 (wait_for_sigstop): No longer a for_each_inferior callback.
7442 Rewrite on top of linux_wait_for_event_filtered.
7443 (stop_all_lwps): Call wait_for_sigstop directly.
7444 * server.c (resume, handle_target_event): Handle
7445 TARGET_WAITKIND_NO_RESUMED.
7446
d763de10
JB
74472014-02-26 Joel Brobecker <brobecker@adacore.com>
7448
7449 * win32-low.c (psapi_get_dll_name,
7450 * win32_CreateToolhelp32Snapshot): Delete.
7451 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7452 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7453 Delete.
7454 (handle_load_dll): Add function description.
7455 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7456
850a0f76
JB
74572014-02-26 Joel Brobecker <brobecker@adacore.com>
7458
7459 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7460 Add comment.
7461 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7462 base address when calling win32_add_one_solib.
7463 (handle_load_dll): Delete local variable load_addr.
7464 Remove 0x1000 offset applied to DLL base address when calling
7465 win32_add_one_solib.
7466 (handle_unload_dll): Add comment.
7467
f25b3fc3
JB
74682014-02-26 Joel Brobecker <brobecker@adacore.com>
7469
7470 * win32-low.c (win32_add_all_dlls): Renames
7471 win32_ensure_ntdll_loaded. Rewrite function documentation.
7472 Adjust implementation to always load all DLLs.
7473 Add 0x1000 offset to DLL base address when calling
7474 win32_add_one_solib.
7475 (child_initialization_done): New static global.
7476 (do_initial_child_stuff): Set child_initialization_done to
7477 zero during child initialization, and 1 after. Replace call
7478 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7479 Add comment.
7480 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7481 (handle_unload_dll): Add function documentation.
7482 (get_child_debug_event): Ignore load and unload DLL events
7483 during child initialization.
7484
d86d4aaf
DE
74852014-02-20 Doug Evans <dje@google.com>
7486
3bc32da3 7487 Remove global all_lwps.
d86d4aaf
DE
7488 * inferiors.h (ptid_of): Move here from linux-low.h.
7489 (pid_of, lwpid_of): Ditto.
7490 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7491 parameter is a struct thread_info * now.
7492 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7493 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7494 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7495 directly.
7496 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7497 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7498 * linux-arm-low.c (update_registers_callback): Update, "entry"
7499 parameter is a struct thread_info * now.
7500 Fetch lwpid from current_inferior directly.
7501 (arm_insert_point): Pass &all_threads to find_inferior instead of
7502 &all_lwps.
7503 (arm_remove_point): Ditto.
7504 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7505 (arm_prepare_to_resume): Fetch pid from thread.
7506 (arm_read_description): Fetch lwpid from current_inferior directly.
7507 * linux-low.c (all_lwps): Delete.
7508 (delete_lwp): Delete call to remove_inferior.
7509 (handle_extended_wait): Fetch lwpid from thread.
7510 (add_lwp): Don't set lwp->entry.id. Remove call to
7511 add_inferior_to_list.
7512 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7513 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7514 (kill_one_lwp_callback): Ditto.
7515 (linux_kill): Don't dereference NULL pointer.
7516 Fetch ptid,lwpid from thread.
7517 (get_detach_signal): Fetch ptid from thread.
7518 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7519 Simplify call to regcache_invalidate_thread.
7520 (delete_lwp_callback): Update, "entry" parameter is a
7521 struct thread_info * now. Fetch pid from thread.
7522 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7523 (status_pending_p_callback): Update, "entry" parameter is a
7524 struct thread_info * now. Fetch ptid from thread.
7525 (find_lwp_pid): Update, "entry" parameter is a
7526 struct thread_info * now.
7527 (linux_wait_for_lwp): Fetch pid from thread.
7528 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7529 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7530 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7531 (dequeue_one_deferred_signal): Ditto.
7532 (cancel_breakpoint): Fetch ptid from current_inferior.
7533 (linux_wait_for_event): Pass &all_threads to find_inferior,
7534 not &all_lwps. Fetch ptid, lwpid from thread.
7535 (count_events_callback): Update, "entry" parameter is a
7536 struct thread_info * now.
7537 (select_singlestep_lwp_callback): Ditto.
7538 (select_event_lwp_callback): Ditto.
7539 (cancel_breakpoints_callback): Ditto.
7540 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7541 not &all_lwps.
7542 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7543 (unsuspend_one_lwp): Update, "entry" parameter is a
7544 struct thread_info * now.
7545 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7546 not &all_lwps.
7547 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7548 Fetch lwpid from thread, not lwp.
7549 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7550 Pass &all_threads to find_inferior, not &all_lwps.
7551 (send_sigstop): Fetch lwpid from thread, not lwp.
7552 (send_sigstop_callback): Update, "entry" parameter is a
7553 struct thread_info * now.
7554 (suspend_and_send_sigstop_callback): Ditto.
7555 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7556 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7557 struct thread_info * now.
7558 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7559 from thread, lwp.
7560 (lwp_running): Update, "entry" parameter is a
7561 struct thread_info * now.
7562 (stop_all_lwps): Fetch ptid from thread.
7563 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7564 (linux_resume_one_lwp): Fetch lwpid from thread.
7565 (linux_set_resume_request): Update, "entry" parameter is a
7566 struct thread_info * now. Fetch pid, lwpid from thread.
7567 (resume_status_pending_p): Update, "entry" parameter is a
7568 struct thread_info * now.
7569 (need_step_over_p): Ditto. Fetch lwpid from thread.
7570 (start_step_over): Fetch lwpid from thread.
7571 (linux_resume_one_thread): Update, "entry" parameter is a
7572 struct thread_info * now. Fetch lwpid from thread.
7573 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7574 (proceed_one_lwp): Update, "entry" parameter is a
7575 struct thread_info * now. Fetch lwpid from thread.
7576 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7577 struct thread_info * now.
7578 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7579 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7580 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7581 directly.
7582 (regsets_store_inferior_registers): Ditto.
7583 (fetch_register, store_register): Ditto.
7584 (linux_read_memory, linux_write_memory): Ditto.
7585 (linux_request_interrupt): Ditto.
7586 (linux_read_auxv): Ditto.
7587 (linux_xfer_siginfo): Ditto.
7588 (linux_qxfer_spu): Ditto.
7589 (linux_qxfer_libraries_svr4): Ditto.
7590 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7591 moved to inferiors.h.
7592 (get_lwp): Delete.
7593 (get_thread_lwp): Update.
7594 (struct lwp_info): Delete member "entry". Simplify comment for
7595 member "thread".
7596 (all_lwps): Delete.
7597 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7598 current_inferior directly.
7599 (update_watch_registers_callback): Update, "entry" parameter is a
7600 struct thread_info * now. Fetch pid from thread.
7601 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7602 (mips_insert_point): Fetch lwpid from current_inferior.
7603 Pass &all_threads to find_inferior, not &all_lwps.
7604 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7605 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7606 directly.
7607 (mips_stopped_data_address): Ditto.
7608 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7609 directly.
7610 * linux-tile-low.c (tile_arch_setup): Ditto.
7611 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7612 (update_debug_registers_callback): Update, "entry" parameter is a
7613 struct thread_info * now. Fetch pid from thread.
7614 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7615 Pass &all_threads to find_inferior, not &all_lwps.
7616 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7617 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7618 Pass &all_threads to find_inferior, not &all_lwps.
7619 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7620 (i386_dr_low_get_status): Ditto.
7621 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7622 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7623 (x86_linux_read_description): Ditto.
7624 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7625
3b8361aa
DE
76262014-02-20 Doug Evans <dje@google.com>
7627
7628 * inferiors.c (get_first_inferior): Fix buglet.
7629
f7667f0d
DE
76302014-02-19 Doug Evans <dje@google.com>
7631
7632 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7633 * inferiors.c (add_thread): Change result type to struct thread_info *.
7634 All callers updated.
7635 (add_lwp): Call add_thread here instead of in callers.
7636 All callers updated.
7637 * linux-low.h (get_lwp_thread): Rewrite.
7638 (struct lwp_info): New member "thread".
7639
b3312d80
DE
76402014-02-19 Doug Evans <dje@google.com>
7641
7642 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7643 All callers updated.
7644
ecc6f45c
DE
76452014-02-19 Doug Evans <dje@google.com>
7646
7647 * inferiors.c (add_thread): Fix whitespace.
7648
649ebbca
DE
76492014-02-19 Doug Evans <dje@google.com>
7650
7651 * dll.c (clear_dlls): Replace accessing list implemention details
7652 with API function.
7653 * gdbthread.h (get_first_thread): Declare.
7654 * inferiors.c (for_each_inferior_with_data): New function.
7655 (get_first_thread): New function.
7656 (find_thread_ptid): Simplify.
7657 (get_first_inferior): New function.
7658 (clear_list): Delete.
7659 (one_inferior_p): New function.
7660 (clear_inferior_list): New function.
7661 (clear_inferiors): Update.
7662 * inferiors.h (for_each_inferior_with_data): Declare.
7663 (clear_inferior_list): Declare.
7664 (one_inferior_p): Declare.
7665 (get_first_inferior): Declare.
7666 * linux-low.c (linux_wait_for_event): Replace accessing list
7667 implemention details with API function.
7668 * server.c (target_running): Ditto.
7669 (accumulate_file_name_length): New function.
7670 (emit_dll_description): New function.
7671 (handle_qxfer_libraries): Replace accessing list implemention
7672 details with API function.
7673 (handle_qxfer_threads_worker): New function.
7674 (handle_qxfer_threads_proper): Replace accessing list implemention
7675 details with API function.
7676 (handle_query): Ditto.
7677 (visit_actioned_threads_callback_ftype): New typedef.
7678 (visit_actioned_threads_data): New struct.
7679 (visit_actioned_threads): Rewrite to be find_inferior callback.
7680 (resume): Call find_inferior.
7681 (handle_status): Replace accessing list implemention
7682 details with API function.
7683 (process_serial_event): Replace accessing list implemention details
7684 with API function.
7685 * target.c (set_desired_inferior): Replace accessing list implemention
7686 details with API function.
7687 * tracepoint.c (same_process_p): New function.
7688 (gdb_agent_about_to_close): Replace accessing list implemention
7689 details with API function.
7690 * win32-low.c (child_delete_thread): Replace accessing list
7691 implemention details with API function.
7692 (match_dll_by_basename): New function.
7693 (dll_is_loaded_by_basename): New function.
7694 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7695 details call to dll_is_loaded_by_basename.
7696
80894984
DE
76972014-02-19 Doug Evans <dje@google.com>
7698
7699 * dll.h (struct dll_info): Add comment.
7700 * gdbthread.h (struct thread_info): Add comment.
7701 (current_ptid): Simplify.
7702 * inferiors.c (add_process): Update.
7703 (remove_process): Update.
7704 * inferiors.h (struct process_info): Rename member "head" to "entry".
7705 * linux-low.c (delete_lwp): Update.
7706 (add_lwp): Update.
7707 (last_thread_of_process_p): Update.
7708 (kill_one_lwp_callback, linux_kill): Update.
7709 (status_pending_p_callback): Update.
7710 (wait_for_sigstop): Update. Simplify read of ptid.
7711 (start_step_over): Update.
7712 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7713 (get_lwp_thread): Update.
7714 (struct lwp_info): Rename member "head" to "entry".
7715 * regcache.h (inferior_list_entry): Delete.
7716 * server.c (kill_inferior_callback): Update.
7717 (detach_or_kill_inferior_callback): Update.
7718 (print_started_pid): Update.
7719 (print_attached_pid): Update.
7720 (process_serial_event): Simplify read of ptid.
7721 * thread-db.c (thread_db_create_event): Update.
7722 (thread_db_get_tls_address): Update.
7723 * win32-low.c (current_inferior_ptid): Simplify.
7724
46917d26
TT
77252014-02-19 Tom Tromey <tromey@redhat.com>
7726
7727 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7728 argument.
7729 (target_supports_btrace): Update.
7730
0759a81e
YQ
77312014-02-14 Yao Qi <yao@codesourcery.com>
7732
7733 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7734 (rsp-low-ipa.o): New target.
7735
a7191e8b
TT
77362014-02-12 Tom Tromey <tromey@redhat.com>
7737
7738 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7739 convert_ascii_to_int.
7740 * regcache.c (registers_to_string): Likewise.
7741 * remote-utils.c (decode_M_packet): Likewise.
7742 * server.c (process_serial_event): Likewise.
7743
ff0e980e
TT
77442014-02-12 Tom Tromey <tromey@redhat.com>
7745
7746 * server.c (handle_query, handle_v_run): Use hex2bin, not
7747 unhexify.
7748 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7749
e9371aff
TT
77502014-02-12 Tom Tromey <tromey@redhat.com>
7751
7752 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7753 convert_int_to_ascii.
7754 * regcache.c (registers_to_string, collect_register_as_string):
7755 Likewise.
7756 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7757 Likewise.
7758 * server.c (process_serial_event): Likewise.
7759 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7760 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7761
971dc0b8
TT
77622014-02-12 Tom Tromey <tromey@redhat.com>
7763
7764 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7765 bin2hex, not hexify.
7766 * tracepoint.c (cmd_qtstatus): Likewise.
7767
0a822afb
TT
77682014-02-12 Tom Tromey <tromey@redhat.com>
7769
7770 * remote-utils.c (monitor_output): Pass explicit length to
7771 hexify.
7772
9c3d6531
TT
77732014-02-12 Tom Tromey <tromey@redhat.com>
7774
7775 * tracepoint.c: Include rsp-low.h.
7776 * server.c: Include rsp-low.h.
7777 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7778 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7779 declare.
7780 * remote-utils.c: Include rsp-low.h.
7781 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7782 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7783 (convert_int_to_ascii, convert_ascii_to_int): Move to
7784 common/rsp-low.c.
7785 * regcache.c: Include rsp-low.h.
7786 * ax.c: Include rsp-low.h.
7787 * Makefile.in (SFILES): Add common/rsp-low.c.
7788 (OBS): Add rsp-low.o.
7789 (rsp-low.o): New target.
7790
01fd3ea5
TT
77912014-02-12 Tom Tromey <tromey@redhat.com>
7792
7793 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7794 Include print-utils.h.
7795 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7796 (plongest, thirty_two, phex_nz): Remove.
7797 * Makefile.in (SFILES): Add common/print-utils.c.
7798 (OBS): Add print-utils.o.
7799 (print-utils-ipa.o): New target.
7800 (print-utils.o): New target.
7801 (IPA_OBJS): Add print-utils-ipa.o.
7802
e99dc820
TT
78032014-02-06 Tom Tromey <tromey@redhat.com>
7804
7805 * Makefile.in (SFILES): Fix indentation.
7806
ee1e2d4f
DE
78072014-02-05 Doug Evans <dje@google.com>
7808
7809 * linux-low.c (linux_wait_for_event): Improve comment.
7810 (linux_wait_1): Keep current_inferior in sync with event_child.
7811
f5a02773
DE
78122014-01-22 Doug Evans <dje@google.com>
7813
7814 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7815
87ce2a04
DE
78162014-01-22 Doug Evans <dje@google.com>
7817
7818 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7819 * configure: Regenerate.
7820 * config.in: Regenerate.
7821 * Makefile.in (SFILES): Add debug.c.
7822 (OBS): Add debug.o.
7823 * debug.c: New file.
7824 * debug.h: New file.
7825 * linux-aarch64-low.c (*): Update all debugging printfs to use
7826 debug_printf instead of fprintf.
7827 * linux-arm-low.c (*): Ditto.
7828 * linux-cris-low.c (*): Ditto.
7829 * linux-crisv32-low.c (*): Ditto.
7830 * linux-m32r-low.c (*): Ditto.
7831 * linux-sparc-low.c (*): Ditto.
7832 * linux-x86.c (*): Ditto.
7833 * linux-low.c (*): Ditto.
7834 (linux_wait_1): Add calls to debug_enter, debug_exit.
7835 (linux_wait): Remove redundant debugging printf.
7836 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7837 (linux_resume, unstop_all_lwps): Ditto.
7838 * mem-break.c (*): Update all debugging printfs to use
7839 debug_printf instead of fprintf.
7840 * remote-utils.c (*): Ditto.
7841 * thread-db.c (*): Ditto.
7842 * server.c #include <ctype.h>, "gdb_vecs.h".
7843 (debug_threads): Moved to debug.c.
7844 (*): Update all debugging printfs to use debug_printf instead of
7845 fprintf.
7846 (start_inferior): Replace call to fflush with call to debug_flush.
7847 (monitor_show_help): Mention set debug-format.
7848 (parse_debug_format_options): New function.
7849 (handle_monitor_command): Handle "monitor set debug-format".
7850 (gdbserver_usage): Mention --debug-format.
7851 (main): Parse --debug-format.
7852 * server.h (debug_threads): Declaration moved to debug.h.
7853 #include "debug.h".
7854 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7855 trace_debug_1 that uses debug_printf.
7856 (tracepoint_look_up_symbols): Update all debugging printfs to use
7857 debug_printf instead of fprintf.
7858
e671835b
BS
78592014-01-20 Baruch Siach <baruch@tkos.co.il>
7860
7861 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7862 sys/ptrace.h.
7863
b5737fa9
PA
78642014-01-17 Pedro Alves <palves@redhat.com>
7865
ea38d2a9 7866 PR build/16445
c7faa97a
PA
7867 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7868 defined after including gdb_proc_service.h.
b5737fa9 7869
40ed484e
DE
78702014-01-16 Doug Evans <dje@google.com>
7871
7872 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7873 (match_dll): Use it.
7874
969c39fb
MM
78752014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7876
7877 * target.h (target_ops) <read_btrace>: Change parameters and
7878 return type to allow error reporting.
7879 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7880 trace reading errors on.
7881 * linux-low.c (linux_low_read_btrace): Pass trace reading
7882 errors on.
7883 (linux_low_disable_btrace): New.
7884
ab7f45ba
DE
78852014-01-15 Doug Evans <dje@google.com>
7886
7887 * inferiors.c (thread_id_to_gdb_id): Delete.
7888 * inferiors.h (thread_id_to_gdb_id): Delete.
7889
66af0f44
EZ
78902014-01-13 Eli Zaretskii <eliz@gnu.org>
7891
7892 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7893 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7894 versions.
7895
9939e131
PA
78962014-01-08 Pedro Alves <palves@redhat.com>
7897
7898 * server.c (handle_status): Don't discard previous queued stop
7899 replies or thread's pending status here.
7900 (main) <disconnection>: Do it here instead.
7901
b7ea362b
PA
79022014-01-08 Pedro Alves <palves@redhat.com>
7903
7904 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7905 * server.c (visit_actioned_threads, handle_pending_status): New
7906 function.
7907 (handle_v_cont): Factor out parts to ...
7908 (resume): ... this new function. If in all-stop, and a thread
7909 being resumed has a pending status, report it without actually
7910 resuming.
7911 (myresume): Adjust to use the new 'resume' function.
7912 (clear_pending_status_callback, set_pending_status_callback)
7913 (find_status_pending_thread_callback): New functions.
7914 (handle_status): Handle the case of multiple threads having
7915 interesting statuses to report. Report threads' real last signal
7916 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7917 with an interesting thread to report the status for, instead of
7918 always reporting the status of the first thread.
7919
28498c42
JB
79202014-01-01 Joel Brobecker <brobecker@adacore.com>
7921
7922 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7923 * gdbreplay.c (gdbreplay_version): Likewise.
7924
f45c82da
YZ
79252013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7926
7927 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7928 iov.iov_len with the real length in use.
7929
379a5e2d
JB
79302013-12-13 Joel Brobecker <brobecker@adacore.com>
7931
7932 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7933 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7934 for all targets that use win32-low.c.
7935 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7936 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7937
4210d83e
PA
79382013-12-13 Pedro Alves <palves@redhat.com>
7939
7940 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7941 if equal to TARGET_WAITKIND_LOADED.
7942 * win32-low.c (cached_status): New static global.
7943 (win32_wait): Add declaration.
7944 (do_initial_child_stuff): Flush all initial pending debug events
7945 up to the initial breakpoint.
7946 (win32_wait): If CACHED_STATUS was set, return that instead
7947 of doing a real wait. Remove the code resuming the execution
7948 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7949 during the initial phase. Also remove the code changing
7950 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7951 TARGET_WAITKIND_STOPPED.
7952
e7f0d979
YQ
79532013-12-11 Yao Qi <yao@codesourcery.com>
7954
7955 * notif.c (handle_notif_ack): Return 0 if no notification
7956 matches.
7957
ebcf782c
DE
79582013-11-20 Doug Evans <dje@google.com>
7959
7960 * linux-low.c (linux_set_resume_request): Fix comment.
7961
20ad9378
DE
79622013-11-20 Doug Evans <dje@google.com>
7963
7964 * linux-low.c (resume_status_pending_p): Tweak comment.
7965
a196ebeb
WT
79662013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7967
7968 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7969 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7970 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7971 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7972 (srv_amd64_regobj): Add amd64-mpx.o.
7973 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7974 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7975 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7976 * i387-fp.c (num_pl_bnd_register) Added constant.
7977 (num_pl_bnd_cfg_registers) Added constant.
7978 (struct i387_xsave) Added reserved area and MPX fields.
7979 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7980 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7981 function.
7982 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7983 (init_registers_amd64_mpx_linux): Declare new function.
7984 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7985 (x86_64_regmap): Add MPX registers.
7986 (x86_linux_read_description): Add MPX case.
7987 (initialize_low_arch): Initialize MPX targets.
7988
0080a2f6
TT
79892013-11-18 Tom Tromey <tromey@redhat.com>
7990
7991 * configure: Rebuild.
7992 * configure.ac: Don't check for stdlib.h.
7993 * gdbreplay.c: Unconditionally include stdlib.h.
7994
2978b111
TT
79952013-11-18 Tom Tromey <tromey@redhat.com>
7996
7997 * config.in: Rebuild.
7998 * configure: Rebuild.
7999 * configure.ac: Don't use AC_HEADER_DIRENT.
8000
a3d08894
TT
80012013-11-18 Tom Tromey <tromey@redhat.com>
8002
8003 * server.h: Don't check HAVE_STRING_H.
8004 * gdbreplay.c: Don't check HAVE_STRING_H.
8005 * configure: Rebuild.
8006
0a5dd17d
TT
80072013-11-18 Tom Tromey <tromey@redhat.com>
8008
8009 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8010 LIBGNU.
8011
1bd2f0ba
TT
80122013-11-08 Tom Tromey <tromey@redhat.com>
8013
8014 * configure, config.in: Rebuild.
8015 * configure.ac: Remove unused configury.
8016
3266f10b
TT
80172013-11-08 Tom Tromey <tromey@redhat.com>
8018
8019 * acinclude.m4: Include common.m4, codeset.m4.
8020 * configure, config.in: Rebuild.
8021 * configure.ac: Use GDB_AC_COMMON.
8022
6682d959
AA
80232013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8024
8025 * linux-s390-low.c (HWCAP_S390_TE): New define.
8026 (s390_arch_setup): Consider the TE field in the HWCAP for
8027 determining 'have_regset_tdb'.
8028
fd0a4d76
SDJ
80292013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8030
8031 PR gdb/16014
8032 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8033 call to sizeof.
8034
1a3d890b
PA
80352013-10-02 Pedro Alves <palves@redhat.com>
8036
8037 * server.c (process_serial_event): Don't output "GDBserver
8038 exiting" if GDB is connected through stdio.
8039 * target.c (mywait): Likewise, be silent if GDB is connected
8040 through stdio.
8041
97ad4581
JB
80422013-10-01 Joel Brobecker <brobecker@adacore.com>
8043
8044 * lynx-low.c (lynx_add_threads_after_attach): New function.
8045 (lynx_attach): Remove call to add_thread. Add call to
8046 lynx_add_threads_after_attach instead.
8047
5b4e221c
MF
80482013-09-28 Mike Frysinger <vapier@gentoo.org>
8049
8050 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8051 * config.in, configure: Regenerated.
8052
ee47b2f8
YQ
80532013-09-18 Yao Qi <yao@codesourcery.com>
8054
8055 PR server/15959
8056 * server.c (start_inferior): Clear 'resume_info'.
8057
d6707650 80582013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8059
d6707650
JW
8060 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8061 for each register.
8062
9243dd0e 80632013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8064
9243dd0e
JW
8065 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8066 linux-tile-low.o to srv_tgtobj.
8067
c623a6ef
WN
80682013-09-16 Will Newton <will.newton@linaro.org>
8069
8070 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8071 out regs.
8072
fb71d39e
PA
80732013-09-06 Pedro Alves <palves@redhat.com>
8074
8075 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8076 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8077 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8078 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8079 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8080 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8081
8e7e9910
PA
80822013-09-06 Pedro Alves <palves@redhat.com>
8083
8084 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8085 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8086
7c3a12ca
PA
80872013-09-06 Pedro Alves <palves@redhat.com>
8088
8089 * linux-amd64-ipa.c: Include tracepoint.h.
8090 * linux-i386-ipa.c: Include tracepoint.h.
8091
8eb3d7b6
RW
80922013-09-06 Ricard Wanderlof <ricardw@axis.com>
8093
8094 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8095 (ps_get_thread_area): New function.
8096
eddddb9d
RW
80972013-09-06 Ricard Wanderlof <ricardw@axis.com>
8098
8099 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8100 (initialize_low_arch): Call init_registers_crisv32 rather than
8101 init_register_crisv32.
8102
533b0600
PA
81032013-09-05 Pedro Alves <palves@redhat.com>
8104
8105 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8106 to ...
8107 * hostio.h: ... this new file.
8108 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8109 win32-low.c: Include hostio.h.
8110
0ce3d3b5
PA
81112013-09-05 Pedro Alves <palves@redhat.com>
8112
8113 * server.h (gdb_client_data, handler_func, callback_handler_func)
8114 (delete_file_handler, add_file_handler, append_callback_event)
8115 (delete_callback_event, start_event_loop, initialize_event_loop):
8116 Move to event-loop.h and include it.
8117 * event-loop.h: New file.
8118
799cdc37
PA
81192013-09-05 Pedro Alves <palves@redhat.com>
8120
8121 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8122 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8123 (loaded_dll, unloaded_dll): Move to ...
8124 * dll.h: ... this new file.
8125 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8126
6a6bbd9d
PA
81272013-09-05 Pedro Alves <palves@redhat.com>
8128
8129 * server.h (current_process, get_thread_process, all_processes)
8130 (add_inferior_to_list, for_each_inferior, current_inferior)
8131 (remove_inferior, add_process, remove_process, find_process_pid)
8132 (have_started_inferiors_p, have_attached_inferiors_p)
8133 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8134 (clear_inferiors, find_inferior, find_inferior_id)
8135 (inferior_target_data, set_inferior_target_data)
8136 (inferior_regcache_data, set_inferior_regcache_data): Move to
8137 inferiors.h, and include it.
8138 * inferiors.h: New file.
8139
f699aaba
PA
81402013-09-05 Pedro Alves <palves@redhat.com>
8141
8142 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8143 Move ...
72f4393d 8144 * ax.h: ... here.
f699aaba 8145
c144c7a0
PA
81462013-09-05 Pedro Alves <palves@redhat.com>
8147
8148 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8149 tracepoint.h.
8150 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8151 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8152 (handle_tracepoint_general_set, handle_tracepoint_query)
8153 (tracepoint_finished_step, tracepoint_was_hit)
8154 (release_while_stepping_state_list, current_traceframe)
8155 (in_readonly_region, traceframe_read_mem)
8156 (fetch_traceframe_registers, traceframe_read_sdata)
8157 (traceframe_read_info, struct fast_tpoint_collect_status)
8158 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8159 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8160 (supply_fast_tracepoint_registers)
8161 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8162 (ipa_tdesc, claim_trampoline_space)
8163 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8164 (agent_mem_read, agent_get_trace_state_variable_value)
8165 (agent_set_trace_state_variable_value, agent_tsv_read)
8166 (agent_mem_read_string, get_raw_reg_func_addr)
8167 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8168 * tracepoint.h: ... this new file.
8169
ff42e6ab
PA
81702013-09-05 Pedro Alves <palves@redhat.com>
8171
8172 * server.h (perror_with_name, error, fatal, warning, paddress)
8173 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8174 include it.
8175 * utils.h: New file.
8176
541af0f4
PA
81772013-09-05 Pedro Alves <palves@redhat.com>
8178
8179 * server.h (remote_debug, noack_mode, transport_is_reliable)
8180 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8181 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8182 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8183 (write_enn, initialize_async_io, enable_async_io)
8184 (disable_async_io, check_remote_input_interrupt_request)
8185 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8186 (dead_thread_notify, prepare_resume_reply)
8187 (decode_address_to_semicolon, decode_address, decode_m_packet)
8188 (decode_M_packet, decode_X_packet, decode_xfer_write)
8189 (decode_search_memory_packet, unhexify, hexify)
8190 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8191 (look_up_one_symbol, relocate_instruction)
8192 (monitor_output): Move to remote-utils.h, and include it.
8193 * remote-utils.h: New file.
8194
eebdf26b
PA
81952013-09-05 Pedro Alves <palves@redhat.com>
8196
8197 * server.h (_): Delete.
8198
3aafd2ff
PA
81992013-09-02 Pedro Alves <palves@redhat.com>
8200
8201 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8202 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8203 allocated.
8204 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8205
cee83bcb
PM
82062013-09-02 Pierre Muller <muller@sourceware.org>
8207
8208 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8209 or WriteProcessMemory complete successfully and handle
8210 ERROR_PARTIAL_COPY error.
8211
9a13b2fa
PA
82122013-09-02 Pedro Alves <palves@redhat.com>
8213
8214 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8215 error instead of EIO.
8216
602e3198
JK
82172013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8218
8219 PR server/15604
8220 * linux-low.c: Include filestuff.h.
8221 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8222 * lynx-low.c: Include filestuff.h.
8223 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8224 * server.c: Include filestuff.h.
8225 (main): Call notice_open_fds.
8226 * spu-low.c: Include filestuff.h.
8227 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8228
96d7229d
LM
82292013-08-22 Luis Machado <lgustavo@codesourcery.com>
8230
8231 * Makefile.in: Explain why ../target and ../nat are not
8232 listed as include file search paths.
8233 (linux-waitpid.o): New object file rule.
8234 * configure.srv (srv_native_linux_obj): New variable.
8235 Replace all occurrences of linux native object files with
8236 $srv_native_linux_obj.
8237 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8238 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8239 (linux_enable_event_reporting): Remove declaration.
8240 (my_waitpid): Moved to common/linux-waitpid.c.
8241 (linux_wait_for_event): Pass ptid when calling
8242 linux_enable_event_reporting.
8243 (linux_supports_tracefork_flag): Remove.
8244 (linux_enable_event_reporting): Likewise.
8245 (linux_tracefork_grandchild): Remove.
8246 (STACK_SIZE): Moved to common/linux-ptrace.c.
8247 (linux_tracefork_child): Remove.
8248 (linux_test_for_tracefork): Remove.
8249 (linux_look_up_symbols): Call linux_supports_traceclone.
8250 (initialize_low): Remove call to linux_test_for_tracefork.
8251 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8252 common/linux-ptrace.h.
8253 (PTRACE_TYPE_ARG4): Likewise.
8254 Include linux-ptrace.h.
8255
32940073
PA
82562013-08-21 Pedro Alves <palves@redhat.com>
8257
8258 * config.in: Renegerate.
8259
33b60d58 82602013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8261
33b60d58
LM
8262 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8263 (SFILES): Remove $(srcdir)/common/target-common.c and
8264 add $(srcdir)/target/waitstatus.c.
8265 (OBS): Remove target-common.o and add waitstatus.o.
8266 (server_h): Remove $(srcdir)/../common/target-common.h and
8267 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8268 and $(srcdir)/../target/waitstatus.h.
8269 (target-common.o): Remove.
8270 (waitstatus.o): New target object file.
8271 * target.h: Do not include target-common.h and
8272 include target/resume.h, target/wait.h and
8273 target/waitstatus.h.
8274
b8e1b30e
LM
82752013-08-13 Luis Machado <lgustavo@codesourcery.com>
8276
8277 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8278 to PTRACE_TYPE_ARG3.
8279 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8280 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8281 PTRACE_TYPE_ARG4.
8282 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8283 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8284
7a60ad40
YQ
82852013-07-27 Jie Zhang <jie@codesourcery.com>
8286 Daniel Jacobowitz <dan@codesourcery.com>
8287 Yao Qi <yao@codesourcery.com>
8288
8289 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8290 (mips-linux-watch.o): New rule.
8291 (mips_linux_watch_h): New variable.
8292 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8293 srv_tgtobj.
8294 * linux-mips-low.c: Include mips-linux-watch.h.
8295 (struct arch_process_info, struct arch_lwp_info): New.
8296 (update_watch_registers_callback): New function.
8297 (mips_linux_new_process, mips_linux_new_thread) New functions.
8298 (mips_linux_prepare_to_resume, mips_insert_point): New
8299 functions.
8300 (mips_remove_point, mips_stopped_by_watchpoint): New
8301 functions.
8302 (rsp_bp_type_to_target_hw_bp_type): New function.
8303 (mips_stopped_data_address): New function.
8304 (the_low_target): Add watchpoint support functions.
8305
de6f69ad
YQ
83062013-07-27 Yao Qi <yao@codesourcery.com>
8307
8308 * i386-low.c: Include break-common.h.
8309 (enum target_hw_bp_type): Remove.
8310
3360c0bf
LM
83112013-07-24 Luis Machado <lgustavo@codesourcery.com>
8312
8313 * Makefile.in (SFILES): /common/target-common.c.
8314 (OBS): Add target-common.o.
8315 (server_h): Add $(srcdir)/../common/target-common.h.
8316 (target-common.o): New target.
8317 * server.c (queue_stop_reply_callback): Free
8318 status string after use.
8319 * target.c (target_waitstatus_to_string): Remove.
8320 * target.h: Include target-common.h.
8321 (resume_kind): Likewise.
8322 (target_waitkind): Likewise.
8323 (target_waitstatus): Likewise.
8324 (TARGET_WNOHANG): Likewise.
8325
bd885420
YQ
83262013-07-04 Yao Qi <yao@codesourcery.com>
8327
8328 * Makefile.in (host_alias): Use @host_noncanonical@.
8329 (target_alias): Use @target_noncanonical@.
8330 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8331 ACX_NONCANONICAL_HOST.
8332 * configure: Regenerated.
8333
8334 Revert:
8335 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8336
8337 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8338 * configure: Rebuild.
8339 * Makefile.in (version_host, version_target): Get from configure.
8340 (version.c): Use $(version_host) and $(version_target).
8341
17ef446e
PA
83422013-07-03 Pedro Alves <palves@redhat.com>
8343
8344 * Makefile.in (config.status): Depend on development.sh.
8345 * acinclude.m4: Include libmcheck.m4.
8346 * configure: Regenerate.
8347
7a9a7487
MG
83482013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8349
8350 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8351 attribute inside the parentheses.
8352 (winapi_DebugSetProcessKillOnExit): Ditto.
8353 (winapi_DebugBreakProcess): Ditto.
8354 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8355
49b64de6
MG
83562013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8357
8358 * notif.h (notif_event): Add a dummy member to avoid compiler
8359 errors.
8360
d5749ee7
PA
83612013-07-01 Pedro Alves <palves@redhat.com>
8362
8363 * hostio.c (HOSTIO_PATH_MAX): Define.
8364 (require_filename, handle_open, handle_unlink, handle_readlink):
8365 Use it.
8366
d8d2a3ee
PA
83672013-07-01 Pedro Alves <palves@redhat.com>
8368
8369 * server.h: Include "pathmax.h".
8370 * linux-low.c: Don't include sys/param.h.
8371 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8372 MAXPATHLEN.
8373 * win32-low.c: Don't include sys/param.h.
8374 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8375
bc7dea8d
PA
83762013-07-01 Pedro Alves <palves@redhat.com>
8377
8378 * event-loop.c: Don't check HAVE_UNISTD_H before including
8379 <unistd.h>.
8380 * gdbreplay.c: Likewise.
8381 * remote-utils.c: Likewise.
8382 * server.c: Likewise.
8383 * configure.ac: Don't check for unistd.h.
8384 * configure: Regenerate.
8385
d6c2da54
TT
83862013-06-28 Tom Tromey <tromey@redhat.com>
8387
8388 * Makefile.in (version.c): Use version.in, not
8389 common/version.in.
8390
257b6bec
MG
83912013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8392
8393 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8394 * configure: Rebuild.
8395 * Makefile.in (version_host, version_target): Get from configure.
8396 (version.c): Use $(version_host) and $(version_target).
8397
86ebe149
DK
83982013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8399
8400 Fix trace-status to output user name without trailing colon.
8401 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8402
f30aa5af
DK
84032013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8404
8405 Fix trace-status to output proper start-time and stop-time.
8406 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8407 output start time and stop time in hex as gdb expects.
8408
28a93511
YQ
84092013-06-26 Pedro Alves <pedro@codesourcery.com>
8410
8411 * tracepoint.c (build_traceframe_info_xml): Output trace state
8412 variables present in the trace buffer.
8413
01208463
TT
84142013-06-24 Tom Tromey <tromey@redhat.com>
8415
8416 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8417 create-version.sh.
8418 (version.o): Remove.
8419 * gdbreplay.c: Include version.h.
8420 (version, host_name): Don't declare.
8421 * server.h: Include version.h.
8422 (version, host_name): Don't declare.
8423
760256f9
PA
84242013-06-12 Pedro Alves <palves@redhat.com>
8425
8426 * linux-x86-low.c (linux_is_elf64): Delete global.
8427 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8428 with local linux_pid_exe_is_elf_64_file use.
8429
030031ee
PA
84302013-06-11 Pedro Alves <palves@redhat.com>
8431
8432 * linux-low.c (regset_disabled, disable_regset): New functions.
8433 (regsets_fetch_inferior_registers)
8434 (regsets_store_inferior_registers): Use them.
8435 (initialize_regsets_info); Don't allocate the disabled_regsets
8436 array here.
8437 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8438 comment.
8439
5da6eb0a
PA
84402013-06-11 Pedro Alves <palves@redhat.com>
8441
8442 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8443 xmalloc.
8444
7e5aaa09
PA
84452013-06-11 Pedro Alves <palves@redhat.com>
8446
8447 * linux-x86-low.c (initialize_low_arch): Call
8448 init_registers_x32_avx_linux.
8449
d878444c
JK
84502013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8451
8452 Fix compatibility with Android Bionic.
8453 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8454 it is not empty.
8455
3aee8918
PA
84562013-06-07 Pedro Alves <palves@redhat.com>
8457
5f2b57b5 8458 PR server/14823
3aee8918
PA
8459 * Makefile.in (OBS): Add tdesc.o.
8460 (IPA_OBJS): Add tdesc-ipa.o.
8461 (tdesc-ipa.o): New rule.
8462 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8463 interface.
8464 * linux-low.c (new_inferior): Delete.
8465 (disabled_regsets, num_regsets): Delete.
8466 (linux_add_process): Adjust to set the new per-process
8467 new_inferior flag.
8468 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8469 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8470 was a stop. When calling arch_setup, switch the current inferior
8471 to the thread that got an event.
8472 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8473 (regsets_fetch_inferior_registers)
8474 (regsets_store_inferior_registers): New regsets_info parameter.
8475 Adjust to use it.
8476 (linux_register_in_regsets): New regs_info parameter. Adjust to
8477 use it.
8478 (register_addr, fetch_register, store_register): New usrregs_info
8479 parameter. Adjust to use it.
8480 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8481 parameter regs_info. Adjust to use it.
8482 (linux_fetch_registers): Get the current inferior's regs_info, and
8483 adjust to use it.
8484 (linux_store_registers): Ditto.
8485 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8486 (initialize_low): Don't initialize the target_regsets here. Call
8487 initialize_low_arch.
8488 * linux-low.h (target_regsets): Delete declaration.
8489 (struct regsets_info): New.
8490 (struct usrregs_info): New.
8491 (struct regs_info): New.
8492 (struct process_info_private) <new_inferior>: New field.
8493 (struct linux_target_ops): Delete the num_regs, regmap, and
8494 regset_bitmap fields. New field regs_info.
8495 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8496 * i387-fp.c (num_xmm_registers): Delete.
8497 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8498 calls to new interface.
8499 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8500 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8501 Infer the number of xmm registers from the regcache's target
8502 description.
8503 * i387-fp.h (num_xmm_registers): Delete.
8504 * inferiors.c (add_thread): Don't install the thread's regcache
8505 here.
8506 * proc-service.c (gregset_info): Fetch the current inferior's
8507 regs_info. Adjust to use it.
8508 * regcache.c: Include tdesc.h.
8509 (register_bytes, reg_defs, num_registers)
8510 (gdbserver_expedite_regs): Delete.
8511 (get_thread_regcache): If the thread doesn't have a regcache yet,
8512 create one, instead of aborting gdbserver.
8513 (regcache_invalidate_one): Rename to ...
8514 (regcache_invalidate_thread): ... this.
8515 (regcache_invalidate_one): New.
8516 (regcache_invalidate): Only invalidate registers of the current
8517 process.
8518 (init_register_cache): Add target_desc parameter, and use it.
8519 (new_register_cache): Ditto. Assert the target description has a
8520 non zero registers_size.
8521 (regcache_cpy): Add assertions. Adjust.
8522 (realloc_register_cache, set_register_cache): Delete.
8523 (registers_to_string, registers_from_string): Adjust.
8524 (find_register_by_name, find_regno, find_register_by_number)
8525 (register_cache_size): Add target_desc parameter, and use it.
8526 (free_register_cache_thread, free_register_cache_thread_one)
8527 (regcache_release, register_cache_size): New.
8528 (register_size): Add target_desc parameter, and use it.
8529 (register_data, supply_register, supply_register_zeroed)
8530 (supply_regblock, supply_register_by_name, collect_register)
8531 (collect_register_as_string, collect_register_by_name): Adjust.
8532 * regcache.h (struct target_desc): Forward declare.
8533 (struct regcache) <tdesc>: New field.
8534 (init_register_cache, new_register_cache): Add target_desc
8535 parameter.
8536 (regcache_invalidate_thread): Declare.
8537 (regcache_invalidate_one): Delete declaration.
8538 (regcache_release): Declare.
8539 (find_register_by_number, register_cache_size, register_size)
8540 (find_regno): Add target_desc parameter.
8541 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8542 declarations.
8543 * remote-utils.c: Include tdesc.h.
8544 (outreg, prepare_resume_reply): Adjust.
8545 * server.c: Include tdesc.h.
8546 (gdbserver_xmltarget): Delete declaration.
8547 (get_features_xml, process_serial_event): Adjust.
8548 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8549 declare.
8550 (struct process_info) <tdesc>: New field.
8551 (ipa_tdesc): Declare.
8552 * tdesc.c: New file.
8553 * tdesc.h: New file.
8554 * tracepoint.c: Include tdesc.h.
8555 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8556 (get_context_regcache): Adjust to pass ipa_tdesc down.
8557 (do_action_at_tracepoint): Adjust to get the register cache size
8558 from the context regcache's description.
8559 (traceframe_walk_blocks): Adjust to get the register cache size
8560 from the current trace frame's description.
8561 (traceframe_get_pc): Adjust to get current trace frame's
8562 description and pass it down.
8563 (gdb_collect): Adjust to get the register cache size from the
8564 IPA's description.
8565 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8566 (gdbserver_xmltarget): Delete.
8567 (initialize_low_tracepoint): Set the ipa's target description.
8568 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8569 (initialize_low_tracepoint): Set the ipa's target description.
8570 * linux-x86-low.c: Include tdesc.h.
8571 [__x86_64__] (is_64bit_tdesc): New.
8572 (ps_get_thread_area, x86_get_thread_area): Use it.
8573 (i386_cannot_store_register): Rename to ...
8574 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8575 (i386_cannot_fetch_register): Rename to ...
8576 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8577 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8578 to new interface.
8579 (target_regsets): Rename to ...
8580 (x86_regsets): ... this.
8581 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8582 interface.
8583 (x86_siginfo_fixup): Use is_64bit_tdesc.
8584 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8585 (tdesc_x32_avx_linux, tdesc_x32_linux)
8586 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8587 Declare.
8588 (x86_linux_update_xmltarget): Delete.
8589 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8590 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8591 (AMD64_LINUX_USER64_CS): New.
8592 (x86_linux_read_description): New, based on
8593 x86_linux_update_xmltarget.
8594 (same_process_callback): New.
8595 (x86_arch_setup_process_callback): New.
8596 (x86_linux_update_xmltarget): New.
8597 (x86_regsets_info): New.
8598 (amd64_linux_regs_info): New.
8599 (i386_linux_usrregs_info): New.
8600 (i386_linux_regs_info): New.
8601 (x86_linux_regs_info): New.
8602 (x86_arch_setup): Reimplement.
8603 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8604 (x86_emit_ops): Ditto.
8605 (the_low_target): Adjust. Install x86_linux_regs_info,
8606 x86_cannot_fetch_register, and x86_cannot_store_register.
8607 (initialize_low_arch): New.
8608 * linux-ia64-low.c (tdesc_ia64): Declare.
8609 (ia64_fetch_register): Adjust.
8610 (ia64_usrregs_info, regs_info): New globals.
8611 (ia64_regs_info): New function.
8612 (the_low_target): Adjust.
8613 (initialize_low_arch): New function.
8614 * linux-sparc-low.c (tdesc_sparc64): Declare.
8615 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8616 Adjust.
8617 (sparc_arch_setup): New function.
8618 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8619 (the_low_target): Adjust.
8620 (initialize_low_arch): New function.
8621 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8622 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8623 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8624 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8625 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8626 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8627 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8628 (tdesc_powerpc_isa205_vsx64l): Declare.
8629 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8630 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8631 (ppc_set_pc, ppc_get_hwcap): Adjust.
8632 (ppc_usrregs_info): Forward declare.
8633 (!__powerpc64__) ppc_regmap_adjusted: New global.
8634 (ppc_arch_setup): Adjust to the current process'es target
8635 description.
8636 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8637 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8638 (ppc_store_evrregset): Adjust.
8639 (target_regsets): Rename to ...
8640 (ppc_regsets): ... this, and make static.
8641 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8642 (ppc_regs_info): New function.
8643 (the_low_target): Adjust.
8644 (initialize_low_arch): New function.
8645 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8646 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8647 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8648 (tdesc_s390x_linux64v2): Declare.
8649 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8650 (s390_fill_gregset, s390_store_last_break): Adjust.
8651 (target_regsets): Rename to ...
8652 (s390_regsets): ... this, and make static.
8653 (s390_get_pc, s390_set_pc): Adjust.
8654 (s390_get_hwcap): New target_desc parameter, and use it.
8655 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8656 (s390_arch_setup): Adjust to set the current process'es target
8657 description. Don't adjust the regmap.
8658 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8659 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8660 (regs_info_3264): New globals.
8661 (s390_regs_info): New function.
8662 (the_low_target): Adjust.
8663 (initialize_low_arch): New function.
8664 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8665 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8666 [__mips64] (init_registers_mips_linux)
8667 (init_registers_mips_dsp_linux): Delete defines.
8668 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8669 (have_dsp): New global.
8670 (mips_read_description): New, based on mips_arch_setup.
8671 (mips_arch_setup): Reimplement.
8672 (get_usrregs_info): New function.
8673 (mips_cannot_fetch_register, mips_cannot_store_register)
8674 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8675 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8676 (target_regsets): Rename to ...
8677 (mips_regsets): ... this, and make static.
8678 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8679 (dsp_regs_info, regs_info): New globals.
8680 (mips_regs_info): New function.
8681 (the_low_target): Adjust.
8682 (initialize_low_arch): New function.
8683 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8684 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8685 Declare.
8686 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8687 (arm_read_description): New, with bits factored from
8688 arm_arch_setup.
8689 (arm_arch_setup): Reimplement.
8690 (target_regsets): Rename to ...
8691 (arm_regsets): ... this, and make static.
8692 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8693 (arm_regs_info): New function.
8694 (the_low_target): Adjust.
8695 (initialize_low_arch): New function.
8696 * linux-m68k-low.c (tdesc_m68k): Declare.
8697 (target_regsets): Rename to ...
8698 (m68k_regsets): ... this, and make static.
8699 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8700 (m68k_regs_info): New function.
8701 (m68k_arch_setup): New function.
8702 (the_low_target): Adjust.
8703 (initialize_low_arch): New function.
8704 * linux-sh-low.c (tdesc_sharch): Declare.
8705 (target_regsets): Rename to ...
8706 (sh_regsets): ... this, and make static.
8707 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8708 (sh_regs_info, sh_arch_setup): New functions.
8709 (the_low_target): Adjust.
8710 (initialize_low_arch): New function.
8711 * linux-bfin-low.c (tdesc_bfin): Declare.
8712 (bfin_arch_setup): New function.
8713 (bfin_usrregs_info, regs_info): New globals.
8714 (bfin_regs_info): New function.
8715 (the_low_target): Adjust.
8716 (initialize_low_arch): New function.
8717 * linux-cris-low.c (tdesc_cris): Declare.
8718 (cris_arch_setup): New function.
8719 (cris_usrregs_info, regs_info): New globals.
8720 (cris_regs_info): New function.
8721 (the_low_target): Adjust.
8722 (initialize_low_arch): New function.
8723 * linux-cris-low.c (tdesc_crisv32): Declare.
8724 (cris_arch_setup): New function.
8725 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8726 (cris_regs_info): New function.
8727 (the_low_target): Adjust.
8728 (initialize_low_arch): New function.
8729 * linux-m32r-low.c (tdesc_m32r): Declare.
8730 (m32r_arch_setup): New function.
8731 (m32r_usrregs_info, regs_info): New globals.
8732 (m32r_regs_info): Adjust.
8733 (initialize_low_arch): New function.
8734 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8735 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8736 (tic6x_usrregs_info): Forward declare.
8737 (tic6x_read_description): New function, based on ...
8738 (tic6x_arch_setup): ... this. Reimplement.
8739 (target_regsets): Rename to ...
8740 (tic6x_regsets): ... this, and make static.
8741 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8742 (tic6x_regs_info): New function.
8743 (the_low_target): Adjust.
8744 (initialize_low_arch): New function.
8745 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8746 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8747 (target_regsets): Rename to ...
8748 (xtensa_regsets): ... this, and make static.
8749 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8750 globals.
8751 (xtensa_arch_setup, xtensa_regs_info): New functions.
8752 (the_low_target): Adjust.
8753 (initialize_low_arch): New function.
8754 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8755 (nios2_arch_setup): Set the current process'es tdesc.
8756 (target_regsets): Rename to ...
8757 (nios2_regsets): ... this.
8758 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8759 (nios2_regs_info): New function.
8760 (the_low_target): Adjust.
8761 (initialize_low_arch): New function.
a261b8f5
PA
8762 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8763 (aarch64_arch_setup): Set the current process'es tdesc.
8764 (target_regsets): Rename to ...
8765 (aarch64_regsets): ... this.
8766 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8767 (aarch64_regs_info): New function.
8768 (the_low_target): Adjust.
8769 (initialize_low_arch): New function.
3aee8918
PA
8770 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8771 globals.
8772 (target_regsets): Rename to ...
8773 (tile_regsets): ... this.
8774 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8775 (tile_regs_info): New function.
8776 (tile_arch_setup): Set the current process'es tdesc.
8777 (the_low_target): Adjust.
8778 (initialize_low_arch): New function.
8779 * spu-low.c (tdesc_spu): Declare.
8780 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8781 * win32-arm-low.c (tdesc_arm): Declare.
8782 (arm_arch_setup): New function.
8783 (the_low_target): Install arm_arch_setup instead of
8784 init_registers_arm.
8785 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8786 (init_windows_x86): Rename to ...
8787 (i386_arch_setup): ... this. Set `win32_tdesc'.
8788 (the_low_target): Adjust.
8789 * win32-low.c (win32_tdesc): New global.
8790 (child_add_thread): Don't create the thread cache here.
8791 (do_initial_child_stuff): Set the new process'es tdesc.
8792 * win32-low.h (struct target_desc): Forward declare.
8793 (win32_tdesc): Declare.
8794 * lynx-i386-low.c (tdesc_i386): Declare global.
8795 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8796 * lynx-low.c (lynx_tdesc): New global.
8797 (lynx_add_process): Set the new process'es tdesc.
8798 * lynx-low.h (struct target_desc): Forward declare.
8799 (lynx_tdesc): Declare global.
8800 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8801 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8802 * nto-low.c (nto_tdesc): New global.
8803 (do_attach): Set the new process'es tdesc.
8804 * nto-low.h (struct target_desc): Forward declare.
8805 (nto_tdesc): Declare.
8806 * nto-x86-low.c (tdesc_i386): Declare.
8807 (nto_x86_arch_setup): Set `nto_tdesc'.
8808
b1fbec62
GB
88092013-06-04 Gary Benson <gbenson@redhat.com>
8810
8811 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8812 to qSupported response when appropriate.
8813 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8814 with nonzero-length annex.
8815 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8816 arguments supplied in annex.
8817
d1ec4ce7
DE
88182013-05-31 Doug Evans <dje@google.com>
8819
ac44adcb 8820 PR server/15594
d1ec4ce7
DE
8821 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8822 64 bits in 64-cross-32 environment.
8823
9b25f2d3
PA
88242013-05-28 Pedro Alves <palves@redhat.com>
8825
8826 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8827 (aarch64-without-fpu.c): Delete rule.
8828 * configure.srv (aarch64*-*-linux*): Remove references to
8829 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8830 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8831 declaration.
8832
6740dc9c
PA
88332013-05-24 Pedro Alves <palves@redhat.com>
8834
8835 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8836 instead of strchr/decode_address. Error if the range isn't split
8837 with a ','. Don't assume there's be a ':' in the action.
8838
c2d6af84
PA
88392013-05-23 Yao Qi <yao@codesourcery.com>
8840 Pedro Alves <palves@redhat.com>
8841
8842 * linux-low.c (lwp_in_step_range): New function.
8843 (linux_wait_1): If the thread was range stepping and stopped
8844 outside the stepping range, report the stop to GDB. Otherwise,
8845 continue stepping. Add range stepping debug output.
8846 (linux_set_resume_request): Copy the step range from the resume
8847 request to the lwp.
8848 (linux_supports_range_stepping): New.
8849 (linux_target_ops) <supports_range_stepping>: Set to
8850 linux_supports_range_stepping.
8851 * linux-low.h (struct linux_target_ops)
8852 <supports_range_stepping>: New field.
8853 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8854 * linux-x86-low.c (x86_supports_range_stepping): New.
8855 (the_low_target) <supports_range_stepping>: Set to
8856 x86_supports_range_stepping.
8857 * server.c (handle_v_cont): Handle 'r' action.
8858 (handle_v_requests): Append ";r" if the target supports range
8859 stepping.
8860 * target.h (struct thread_resume) <step_range_start,
8861 step_range_end>: New fields.
8862 (struct target_ops) <supports_range_stepping>:
8863 New field.
8864 (target_supports_range_stepping): New macro.
8865
58794e1a
JB
88662013-05-17 Joel Brobecker <brobecker@adacore.com>
8867
8868 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8869 confusion in comment.
8870
d631c5a7
JB
88712013-05-17 Joel Brobecker <brobecker@adacore.com>
8872
8873 * lynx-low.c (struct process_info_private): New type.
8874 (lynx_add_process): New function.
8875 (lynx_create_inferior, lynx_attach): Replace calls to
8876 add_process by calls to lynx_add_process.
8877 (lynx_resume): If PTID is null, then try using
8878 current_process()->private->last_wait_event_ptid.
8879 Add comments.
8880 (lynx_clear_inferiors): Delete. The contents of that function
8881 has been inlined in lynx_mourn;
8882 (lynx_wait_1): Save the ptid in the process's private data.
8883 (lynx_mourn): Free the process' private data. Replace call
8884 to lynx_clear_inferiors by call to clear_inferiors.
8885
96f7a20f
YQ
88862013-05-17 Yao Qi <yao@codesourcery.com>
8887
8888 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8889 the right place.
8890
db0dfaa0
LM
88912013-05-16 Luis Machado <lgustavo@codesourcery.com>
8892
8893 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8894 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8895 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8896 PT_TEXT_END_ADDR guards. Update comments.
8897 (linux_target_op) <read_offsets>: Conditionally define to
8898 linux_read_offsets if the target is UCLIBC and if it defines
8899 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8900
68f5f838
SL
89012013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8902 Andrew Jenner <andrew@codesourcery.com>
8903
8904 * Makefile.in (SFILES): Add linux-nios2-low.c.
8905 (clean): Add action to delete nios2-linux.c.
8906 (nios2-linux.c): New rule.
8907 * configure.srv: Add nios2*-*-linux*.
8908 * linux-nios2-low.c: New.
8909
1ebff1fd
HAQ
89102013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8911
8912 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8913
f6150862
HZ
89142013-04-25 Hui Zhu <hui@codesourcery.com>
8915
8916 PR gdb/15186
f6150862
HZ
8917 * ax.c (ax_printf): Add fflush.
8918
614c279d
TT
89192013-04-22 Tom Tromey <tromey@redhat.com>
8920
8921 * Makefile.in (SFILES): Add filestuff.c.
8922 (OBS): Add filestuff.o.
8923 (filestuff.o): New target.
8924 * config.in, configure: Rebuild.
8925 * configure.ac: Check for fdwalk, pipe2.
8926
7d4e5717
PA
89272013-04-17 Pedro Alves <palves@redhat.com>
8928
8929 * configure.ac (USE_THREAD_DB): Delete variable.
8930 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8931 Don't AC_SUBST USE_THREAD_DB.
8932 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8933 * config.in, configure: Regenerate.
8934
d5c93e41
PA
89352013-04-16 Pedro Alves <palves@redhat.com>
8936
8937 * linux-low.h (struct lwp_info) <thread_known>: Move under
8938 the USE_THREAD_DB #ifdef.
8939
04f5fe89
PA
89402013-04-16 Pedro Alves <palves@redhat.com>
8941
8942 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8943 (linux-low.o): Delete rule.
8944 * linux-low.h: Always include "gdb_thread_db.h" instead of
8945 conditionally including thread_db.h.
8946 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8947 HAVE_THREAD_DB_H.
8948
480b27bf
JK
89492013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8950
8951 * Makefile.in (install-only): Fix make install regression.
8952
43662968
JK
89532013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8954
8955 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8956 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8957 installation.
8958 * gdbserver.1: Remove.
8959
3e74e146
PA
89602013-03-22 Pedro Alves <palves@redhat.com>
8961
8962 * linux-low.c (handle_extended_wait): Don't call
8963 linux_enable_event_reporting.
8964
a8347a2a
TT
89652013-03-15 Tony Theodore <tonyt@logyst.com>
8966
8967 PR build/9098:
8968 * Makefile.in (SHELL): Use @SHELL@.
8969
eeb56fa7
SDJ
89702013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8971
8972 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8973 compiler warning.
8974
4fa7e2ff
JB
89752013-03-13 Joel Brobecker <brobecker@adacore.com>
8976
8977 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8978 Remove extraneous NULL element.
8979
8ddb1965
YQ
89802013-03-13 Yao Qi <yao@codesourcery.com>
8981
8982 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8983 'V' block in trace frame.
8984
9accd112
MM
89852013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8986
8987 * target.h (struct target_ops): Add btrace ops.
8988 (target_supports_btrace): New macro.
8989 (target_enable_btrace): New macro.
8990 (target_disable_btrace): New macro.
8991 (target_read_btrace): New macro.
8992 * gdbthread.h (struct thread_info): Add btrace field.
8993 * server.c: Include btrace-common.h.
8994 (handle_btrace_general_set): New function.
8995 (handle_btrace_enable): New function.
8996 (handle_btrace_disable): New function.
8997 (handle_general_set): Call handle_btrace_general_set.
8998 (handle_qxfer_btrace): New function.
8999 (struct qxfer qxfer_packets[]): Add btrace entry.
9000 * inferiors.c (remove_thread): Disable btrace.
9001 * linux-low: Include linux-btrace.h.
9002 (linux_low_enable_btrace): New function.
9003 (linux_low_read_btrace): New function.
9004 (linux_target_ops): Add btrace ops.
9005 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9006 Add srv_linux_btrace=yes.
9007 (x86_64-*-linux*): Add linux-btrace.o.
9008 Add srv_linux_btrace=yes.
9009 * configure.ac: Define HAVE_LINUX_BTRACE.
9010 * config.in: Regenerated.
9011 * configure: Regenerated.
9012
5cc22e4c
MM
90132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9014
9015 * server.c (handle_qxfer): Preserve error message if -3 is
9016 returned.
9017 (qxfer): Document the -3 return value.
9018
7c97f91e
MM
90192013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9020
9021 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9022 (linux_btrace_h): New variable.
9023 (linux-btrace.o): New rule.
9024
be9a119c 90252013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9026 Hafiz Abid Qadeer <abidh@codesourcery.com>
9027
9028 * tracepoint.c (trace_buffer_size): New global.
9029 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9030 (init_trace_buffer): Change to one-argument function. Allocate
9031 trace buffer memory.
9032 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9033 handle QTBuffer:size packet.
9034 (cmd_bigqtbuffer_size): New function.
9035 (initialize_tracepoint): Call init_trace_buffer with
9036 DEFAULT_TRACE_BUFFER_SIZE.
9037 * server.c (handle_query): Add QTBuffer:size in the
9038 supported packets.
9039
e64f7499
YQ
90402013-03-07 Yao Qi <yao@codesourcery.com>
9041
9042 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9043 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9044 of -1.
9045 (cmd_qtsp): Adjust condition. Do post increment.
9046 Set cur_action and cur_step_action back to 0.
9047
f0ae6fc3
PA
90482013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9049
9050 PR server/15236
9051 * linux-low.c (linux_write_memory): Return early success if LEN is
9052 zero.
9053
b5b0b0af
CV
90542013-03-05 Corinna Vinschen <vinschen@redhat.de>
9055
334ad4a8 9056 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9057
589bc927
TT
90582013-02-28 Tom Tromey <tromey@redhat.com>
9059
9060 * configure.ac: Invoke AC_SYS_LARGEFILE.
9061 * configure, config.in: Rebuild.
9062
dfe07582
CV
90632013-02-28 Corinna Vinschen <vinschen@redhat.com>
9064
9065 * win32-low.c: Throughout, fix format strings and casts of
9066 printf-like functions to avoid type related warnings on all
9067 platforms.
9068 (get_child_debug_event): Print dwDebugEventCode as hex since
9069 that's how it's usually documented.
9070
736cd585
YQ
90712013-02-28 Yao Qi <yao@codesourcery.com>
9072
9073 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9074 pulongest.
9075
e1f58301
JW
90762013-02-27 Jiong Wang <jiwang@tilera.com>
9077
9078 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9079 (reg-tilegx32.c): New rule.
9080 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9081 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9082 different register info initializer according to elf class.
9083 (init_registers_tilgx32): New function. The tilegx32 register info
9084 initializer.
9085 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9086 (tile_store_gregset): Likewise.
9087
d171ca78
YQ
90882013-02-27 Yao Qi <yao@codesourcery.com>
9089
9090 * server.c (process_point_options): Print debug message when
9091 debug_threads is true.
9092
282bbdf3
YQ
90932013-02-26 Yao Qi <yao@codesourcery.com>
9094
9095 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9096
aca22551
PA
90972013-02-19 Pedro Alves <palves@redhat.com>
9098 Kai Tietz <ktietz@redhat.com>
9099
9100 PR gdb/15161
9101
9102 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9103 instead of strtoul to extract address from packet.
9104 (process_serial_event) <'z'>: Likewise.
9105
4f3cee1c
YQ
91062013-02-18 Yao Qi <yao@codesourcery.com>
9107
9108 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9109
8e1d55a3
PA
91102013-02-14 Pedro Alves <palves@redhat.com>
9111
9112 Plug memory leak.
9113
9114 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9115 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9116
458820da
PA
91172013-02-14 Pedro Alves <palves@redhat.com>
9118
9119 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9120
baea0dae
PA
91212013-02-14 Pedro Alves <palves@redhat.com>
9122
9123 * tracepoint.c (save_string): Delete.
9124 (add_tracepoint_action): Use savestring instead of save_string.
9125
0b1afbb3
PA
91262013-02-12 Pedro Alves <palves@redhat.com>
9127
9128 * linux-xtensa-low.c: Ditto.
9129 * xtensa-xtregs.c: Ditto.
9130
8a4ac37e
PA
91312013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9132
9133 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9134 thread_db.
9135
148de6bb
MS
91362013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9137
9138 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9139 aarch64_num_wp_regs and aarch64_num_bp_regs to
9140 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9141
55fac6e0
MS
91422013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9143
9144 * linux-aarch64-low.c (ps_get_thread_area): Replace
9145 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9146
176eb98c
MS
91472013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9148 Marcus Shawcroft <marcus.shawcroft@arm.com>
9149 Nigel Stephens <nigel.stephens@arm.com>
9150 Yufeng Zhang <yufeng.zhang@arm.com>
9151
9152 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9153 (aarch64.c, aarch64-without-fpu.c): New targets.
9154 * configure.srv (aarch64*-*-linux*): New.
9155 * linux-aarch64-low.c: New file.
9156
56f7af9c
MS
91572013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9158
43aaf8b6 9159 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9160 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9161 (dequeue_one_deferred_signal, linux_resume_one_thread)
9162 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9163 (linux_tracefork_grandchild, linux_test_for_tracefork)
9164 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9165 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9166 where the argument is 0.
9167
60f662b0
YQ
91682013-01-25 Yao Qi <yao@codesourcery.com>
9169
9170 * event-loop.c: Include "queue.h".
9171 (gdb_event_p): New typedef.
9172 (struct gdb_event) <next_event>: Remove.
9173 (event_queue): Change to QUEUE(gdb_event_p).
9174 (async_queue_event): Remove.
9175 (gdb_event_xfree): New.
9176 (initialize_event_loop): New.
9177 (process_event): Use API from QUEUE.
9178 (wait_for_event): Likewise.
9179 * server.c (main): Call initialize_event_loop.
9180 * server.h (initialize_event_loop): Declare.
9181
5ae4861a
YQ
91822013-01-18 Yao Qi <yao@codesourcery.com>
9183
9184 * ax.h (struct eval_agent_expr_context): New.
9185 (gdb_eval_agent_expr): Update declaration.
9186 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9187 TFRAME. Add new argument CTX.
9188 * server.h (struct eval_agent_expr_context): Declare.
9189 (agent_mem_read, agent_tsv_read): Update declaration.
9190 (agent_mem_read_string): Likewise.
9191 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9192 (add_traceframe_block): Add new argument TPOINT.
9193 Increase TPOINT->traceframe_usage.
9194 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9195 eval_tracepoint_agent_expr.
9196 (condition_true_at_tracepoint): Likewise.
9197 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9198 (agent_mem_read_string, agent_tsv_read): Likewise.
9199
85e00e85
YQ
92002013-01-16 Yao Qi <yao@codesourcery.com>
9201
9202 * linux-low.c (linux_resume_one_lwp): Don't check
9203 'lwp->bp_reinsert != 0'.
9204
4039cf45
JB
92052013-01-07 Joel Brobecker <brobecker@adacore.com>
9206 Pedro Alves <palves@redhat.com>
9207
9208 * lynx-low.c (ptrace_request_to_str): Define a temporary
9209 macro and use it to simplify this function's implementation.
9210
9044dee2
JB
92112013-01-07 Joel Brobecker <brobecker@adacore.com>
9212
9213 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9214 sets errno.
9215
e6352c8f
JB
92162013-01-07 Joel Brobecker <brobecker@adacore.com>
9217
9218 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9219
50681a27
JB
92202013-01-07 Joel Brobecker <brobecker@adacore.com>
9221
9222 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9223
3f6e77ef
JB
92242013-01-07 Joel Brobecker <brobecker@adacore.com>
9225
9226 * lynx-low.c (lynx_resume): Use the resume_info parameter
9227 to determine the ptid for the lynx_ptrace call, unless
9228 it is equal to minus_one_ptid, in which case we use the
9229 ptid of the current_inferior.
9230 (lynx_wait_1): After having received a thread create/exit
9231 event, resume the inferior's execution using the signaling
9232 thread's ptid, rather than the old ptid.
9233
7fda33ae
JB
92342013-01-07 Joel Brobecker <brobecker@adacore.com>
9235
9236 * lynx-low.c (lynx_resume): Delete variable ret.
9237
b9786c74
JB
92382013-01-01 Joel Brobecker <brobecker@adacore.com>
9239
9240 * gdbreplay.c (gdbreplay_version): Update copyright year.
9241 * server.c (gdbserver_version): Likewise.
9242
8b93d60f
JB
92432012-12-17 Joel Brobecker <brobecker@adacore.com>
9244
9245 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9246 new thread.
9247
037335a7
JB
92482012-12-17 Joel Brobecker <brobecker@adacore.com>
9249
9250 * lynx-low.c (ptrace_request_to_str): Add handling for
9251 PTRACE_GETTRACESIG.
9252
52d4cbd8
JB
92532012-12-17 Joel Brobecker <brobecker@adacore.com>
9254
9255 * lynx-low.c (lynx_attach): Delete variable new_process.
9256
ab8f6ca9
JB
92572012-12-17 Joel Brobecker <brobecker@adacore.com>
9258
9259 * lynx-low.c (lynx_create_inferior): Delete variable
9260 new_process.
9261
78cbc024
JB
92622012-12-17 Joel Brobecker <brobecker@adacore.com>
9263
9264 * lynx-low.c (ptrace_request_to_str): Do not handle
9265 PTRACE_GETTHREADLIST if this macro does not exist.
9266
14a00470
YQ
92672012-12-15 Yao Qi <yao@codesourcery.com>
9268
9269 * Makefile.in (OBS): Add notif.o.
9270 * notif.c, notif.h: New.
9271 * server.c: Include "notif.h".
9272 (struct vstop_notif) <next>: Remove.
9273 <base>: New field.
9274 (queue_stop_reply): Update.
9275 (push_event, send_next_stop_reply): Remove.
9276 (discard_queued_stop_replies): Update.
9277 (notif_stop): New variable.
9278 (handle_v_stopped): Remove.
9279 (handle_v_requests): Don't call handle_v_stopped. Call
9280 handle_ack_notif instead.
9281 (queue_stop_reply_callback): Call notif_event_enque instead
9282 of queue_stop_reply.
9283 (handle_status): Don't call send_next_stop_reply, call
9284 notif_write_event instead.
9285 (kill_inferior_callback): Likewise.
9286 (detach_or_kill_inferior_callback): Likewise.
9287 (main): Call initialize_notif.
9288 (process_serial_event): Call QUEUE_is_empty.
9289 (handle_target_event): Call notif_push instead of push event.
9290 * server.h (push_event): Remove declaration.
9291
61c125b9
TT
92922012-12-10 Tom Tromey <tromey@redhat.com>
9293
9294 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9295 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9296 macros.
9297 (.c.o): Rewrite.
9298 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9299 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9300 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9301 (amd64-linux-ipa.o, ax.o): Rewrite.
9302 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9303 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9304 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9305 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9306 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9307 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9308 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9309 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9310 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9311 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9312 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9313 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9314 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9315 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9316 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9317 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9318 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9319 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9320 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9321 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9322 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9323 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9324 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9325 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9326 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9327 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9328 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9329 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9330 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9331 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9332 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9333 (reg-tilegx.o): Remove.
9334 (all_object_files): New macro.
9335 Include .deps files.
9336 * aclocal.m4, configure: Rebuild.
9337 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9338 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9339 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9340
e90e9ad9
TT
93412012-12-05 Tom Tromey <tromey@redhat.com>
9342
9343 PR gdb/14917:
9344 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9345
02d403bf 93462012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9347
9348 * configure.ac: Check for linux/perf_event.h.
9349 * config.in: Regenerated.
9350 * configure: Regenerated.
9351
0270a750
PA
93522012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9353
9354 * hostio.c (handle_readlink): Decrease buffer size
9355 parameter passed to readlink by one byte.
9356
8c29b58e
YQ
93572012-11-26 Yao Qi <yao@codesourcery.com>
9358
9359 * configure.ac (build_warnings): Append '-Wempty-body'.
9360 * configure: Regenerated.
9361 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9362 body.
9363
8bdce1ff
PM
93642012-11-15 Pierre Muller <muller@sourceware.org>
9365
9366 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9367 * config.in: Regenerate.
9368 * configure: Regenerate.
9369 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9370 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9371 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9372 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9373 header.
9374 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9375 instead of <sys/wait.h> header.
9376 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9377
02d403bf 93782012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9379
9380 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9381 (various make rules): Remove -DGDBSERVER
9382
fbd5db48
YQ
93832012-11-09 Yao Qi <yao@codesourcery.com>
9384
9385 * spu-low.c (current_ptid): Move it to ..
9386 * gdbthread.h: ... here. New.
9387 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9388 * server.c (myresume, process_serial_event): Likewise.
9389 * thread-db.c (thread_db_find_new_threads): Likewise.
9390 * tracepoint.c (run_inferior_command): Likewise.
9391
b3dc46ff
AB
93922012-10-01 Andrew Burgess <aburgess@broadcom.com>
9393
9394 * server.c (handle_search_memory_1): Include access length in
9395 warning message.
9396
07c04788
HPN
93972012-09-05 Michael Brandt <michael.brandt@axis.com>
9398
9399 * linux-crisv32-low.c: Fix compile errors.
9400
918d227b
YQ
94012012-09-04 Yao Qi <yao@codesourcery.com>
9402
9403 * tracepoint.c (cmd_qtsv): Adjust debug message.
9404 Don't check CUR_TPOINT.
9405
18c1b81a
YQ
94062012-08-28 Yao Qi <yao@codesourcery.com>
9407
9408 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9409 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9410 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9411 Remove declarations of xmalloc, xreallloc, xstrdup and
9412 freeargv.
9413 * Makefile.in (libiberty_h): New.
9414 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9415 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9416
dc82f37b
YQ
94172012-08-23 Yao Qi <yao@codesourcery.com>
9418
9419 * server.h: Remove declaration of 'xsnprintf'.
9420
406b1477
KS
94212012-08-22 Keith Seitz <keiths@redhat.com>
9422
9423 * server.h: Include build-gnulib-gbserver/config.h.
9424 * gdbreplay.c: Likewise.
9425
e6712ff1
DE
94262012-08-08 Doug Evans <dje@google.com>
9427
9428 * Makefile.in (SFILES): Add gdb_vecs.c.
9429 (OBS): Add gdb_vecs.o.
9430 (gdb_vecs_h, host_defs_h): New variables.
9431 (thread-db.o): Add $(gdb_vecs_h) dependency.
9432 (gdb_vecs.o): New rule.
9433 * thread-db.c: #include "gdb_vecs.h".
9434 (thread_db_load_search): Use a vector to iterate over path elements.
9435 Handle text appearing after "$pdir".
9436
9437 * configure.ac: Add check for strstr.
9438 * config.in: Regenerate.
9439 * configure: Regenerate.
9440
7c3270ae
UW
94412012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9442
9443 * hostio.c (handle_pread): If pread fails, fall back to attempting
9444 lseek/read.
9445 (handle_pwrite): Likewise for pwrite.
9446
b62e2b27
UW
94472012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9448
9449 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9450 between unsupported TYPE and unimplementable ADDR/LEN combination.
9451 (arm_insert_point): Act on new return value.
9452
78a99e91
PA
94532012-07-31 Pedro Alves <palves@redhat.com>
9454
9455 * server.c (process_point_options): Only skip tokens if we find
9456 one that is unrecognized. Don't treat 'X' specially while
9457 skipping unrecognized tokens.
9458
fcf303ab
UW
94592012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9460
9461 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9462 to 4-byte-align HW breakpoint addresses for Thumb.
9463
7255706c
YQ
94642012-07-27 Yao Qi <yao@codesourcery.com>
9465
9466 PR remote/14161.
9467
9468 * server.h: Declare gdb_agent_about_to_close.
9469 * target.c (kill_inferior): Include "agent.h".
9470 New. Send command 'kill'.
9471 * target.h (kill_inferior): Removed macro.
9472 * tracepoint.c (gdb_agent_about_to_close): New.
9473 (gdb_agent_helper_thread): Handle command 'close'.
9474 Wait endlessly until the inferior stops.
9475 Install gdb_agent_remove_socket to atexit hook.
9476 (agent_socket_name): New static variable.
9477 (gdb_agent_socket_init): Replace local variable 'name' with
9478 'agent_socket_name'.
9479 (gdb_agent_remove_socket): New.
9480
5a3f286f
YQ
94812012-07-27 Yao Qi <yao@codesourcery.com>
9482
9483 * server.c (process_point_options): Stop at 'X' when parsing.
9484
961bd387
ME
94852012-07-19 Michael Eager <eager@eagercon.com>
9486
a261b8f5 9487 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9488 to hw_execute.
9489 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9490 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9491 hardware breakpoint.
9492
aa7c7447
JK
94932012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9494
9495 * gdbserver/linux-low.c (initialize_low): Call
9496 linux_ptrace_init_warnings.
9497
7f216e7c
DE
94982012-07-02 Doug Evans <dje@google.com>
9499
9500 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9501 pointer to int.
9502
d3ce09f5
SS
95032012-07-02 Stan Shebs <stan@codesourcery.com>
9504
9505 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9506 (ax.o): Add it to build rule.
9507 (ax-ipa.o): Ditto.
9508 (OBS): Add format.o.
9509 (IPA_OBS): Add format.o.
9510 * server.c (handle_query): Claim support for breakpoint commands.
9511 (process_point_options): Add command case.
9512 (process_serial_event): Leave running if there are printfs in
9513 effect.
9514 * mem-break.h (any_persistent_commands): Declare.
9515 (add_breakpoint_commands): Declare.
9516 (gdb_no_commands_at_breakpoint): Declare.
9517 (run_breakpoint_commands): Declare.
9518 * mem-break.c (struct point_command_list): New struct.
9519 (struct breakpoint): New field command_list.
9520 (any_persistent_commands): New function.
9521 (add_commands_to_breakpoint): New function.
9522 (add_breakpoint_commands): New function.
9523 (gdb_no_commands_at_breakpoint): New function.
9524 (run_breakpoint_commands): New function.
9525 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9526 locally.
9527 * ax.c: Include format.h.
9528 (ax_printf): New function.
9529 (gdb_eval_agent_expr): Add printf opcode.
9530
2f8f6aed
YQ
95312012-06-13 Yao Qi <yao@codesourcery.com>
9532
9533 * server.c (start_inferior): Remove duplicated writes to fields
9534 'last_resume_kind' and 'last_status' of 'current_inferior'.
9535
0c9070b3
YQ
95362012-06-12 Yao Qi <yao@codesourcery.com>
9537 Pedro Alves <palves@redhat.com>
9538
9539 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9540 comment.
9541 * server.c (handle_v_cont): Extend comment.
9542
c52daf70
YQ
95432012-06-11 Yao Qi <yao@codesourcery.com>
9544
9545 * linux-low.c (linux_attach): Add 'static'.
9546
d38bbb0a
YQ
95472012-06-06 Yao Qi <yao@codesourcery.com>
9548
9549 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9550
89dc0afd
JK
95512012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9552
9553 Fix gcc -flto compilation warning.
9554 * server.c (main): Make variable multi_mode and attach volatile.
9555
75f62ce7
TJB
95562012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9557
9558 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9559 if the platform doesn't know about it.
9560
65f479b6
PA
95612012-05-30 Jeff Kenton <jkenton@tilera.com>
9562
9563 * Makefile.in (SFILES): Add linux-tile-low.c.
9564 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9565 * configure.srv: Handle tilegx-*-linux*.
9566 * linux-tile-low.c: New file.
9567
0c5bf5a9
JK
95682012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9569
9570 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9571
a493e3e2
PA
95722012-05-24 Pedro Alves <palves@redhat.com>
9573
9574 PR gdb/7205
9575
43aaf8b6 9576 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9577
2ea28649
PA
95782012-05-24 Pedro Alves <palves@redhat.com>
9579
9580 PR gdb/7205
9581
9582 Replace target_signal with gdb_signal throughout.
9583
8d409d16
MR
95842012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9585
9586 * linux-low.c (linux_store_registers): Avoid the copying sequence
9587 when no data has been retrieved by ptrace.
9588
23512c01
MGD
95892012-05-22 Will Deacon <will.deacon@arm.com>
9590
9591 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9592 Include asm/ptrace.h.
9593 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9594 already defined.
9595
4934b29e
MR
95962012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9597
9598 * linux-low.c (linux_store_registers): Don't re-retrieve data
9599 with ptrace that has already been obtained from /proc. Always
9600 copy any data retrieved with ptrace to the buffer supplied.
9601
bde24c0a
PA
96022012-05-11 Yao Qi <yao@codesourcery.com>
9603 Pedro Alves <palves@redhat.com>
9604
9605 * linux-low.c (enum stopping_threads_kind): New.
9606 (stopping_threads): Change type to `enum stopping_threads_kind'.
9607 (handle_extended_wait): If stopping and suspending threads, leave
9608 the new_lwp suspended too.
9609 (linux_wait_for_event): Adjust.
9610 (stop_all_lwps): Set `stopping_threads' to
9611 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9612 whether we're suspending threads or just stopping them. Assert no
9613 recursion happens.
9614
623b6bdf
YQ
96152012-04-29 Yao Qi <yao@codesourcery.com>
9616
9617 * server.h: Move some code to ...
9618 * gdbthread.h: ... here. New.
9619 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9620 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9621 (nto-low.o, win32-low.o): Likewise.
9622 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9623 * regcache.c, remote-utils.c, server.c: Likewise.
9624 * target.c, tracepoint.c, win32-low.c: Likewise.
9625
f15f9948
TJB
96262012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9627
9628 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9629 (PTRACE_ARG4_TYPE): Likewise.
9630 (PTRACE_XFER_TYPE): Likewise.
9631 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9632 ptrace to PTRACE_ARG3_TYPE.
9633 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9634 (PTRACE_ARG4_TYPE): Likewise.
9635 (PTRACE_XFER_TYPE): Likewise.
9636 (linux_detach_one_lwp): Cast fourth argument of
9637 ptrace to long then PTRACE_ARG4_TYPE.
9638 (regsets_fetch_inferior_registers): Cast third argument of
9639 ptrace to long then PTRACE_ARG3_TYPE.
9640 (regsets_store_inferior_registers): Likewise.
9641
38ea300a
PA
96422012-04-20 Pedro Alves <palves@redhat.com>
9643
9644 * configure: Regenerate.
9645
c971b7fa
PA
96462012-04-19 Pedro Alves <palves@redhat.com>
9647
43aaf8b6 9648 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9649 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9650 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9651 (all, install-only, uninstall, clean-info, all-lib, clean): No
9652 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9653 (maintainer-clean realclean distclean): Use subdir_do.
9654 (subdir_do): New.
9655 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9656 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9657 * acinclude.m4: Include acx_configure_dir.m4.
9658 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9659 calls. Call AC_PROG_RANLIB. Configure gnulib using
9660 ACX_CONFIGURE_DIR.
9661 (GNULIB): New.
9662 (GNULIB_STDINT_H): Adjust.
9663 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9664 * gdbreplay.c: Include build-gnulib/config.h.
9665 * server.h: Likewise.
9666 * aclocal.m4: Regenerate.
9667 * config.in: Regenerate.
9668 * configure: Regenerate.
c971b7fa 9669
809277f8
PA
96702012-04-19 Pedro Alves <palves@redhat.com>
9671
9672 * Makefile.in (LIBGNU, INCGNU): Adjust.
9673 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9674 (all, install-only, uninstall, clean-info, all-lib, clean)
9675 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9676 * configure.ac: Adjust AC_OUTPUT output.
9677 * aclocal.m4: Regenerate.
9678 * configure: Regenerate.
9679
fd9bb8b8
PA
96802012-04-19 Pedro Alves <palves@redhat.com>
9681
9682 * Makefile.in (generated_files): New.
9683 (server_h): Remove the explicit dependency on config.h, and depend
9684 on $generated_files.
9685
1c298c66
PA
96862012-04-19 Pedro Alves <palves@redhat.com>
9687
9688 * Makefile.in (INCGNU): Add -Ignulib.
9689
57c4b50b
PA
96902012-04-19 Pedro Alves <palves@redhat.com>
9691
9692 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9693 (INCGNU): ... this, and spell out -I here.
9694 (GNULIB_LIB): Rename to ...
9695 (LIBGNU): ... this.
9696 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9697
1030e047
PA
96982012-04-19 Pedro Alves <palves@redhat.com>
9699
9700 * config.in: Regenerate.
9701
447d4319
PA
97022012-04-19 Pedro Alves <palves@redhat.com>
9703
9704 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9705 * server.h (memmem): Remove declaration.
9706 * config.in: Regenerate.
9707 * configure: Regenerate.
9708
aad9eab9
YQ
97092012-04-19 Yao Qi <yao@codesourcery.com>
9710
9711 * Makefile.in (SFILES): Add common/vec.c.
9712 (OBS): Add vec.o.
9713 (vec.o): New rule.
9714
3e10640f
YQ
97152012-04-19 Yao Qi <yao@codesourcery.com>
9716
9717 * remote-utils.c (prepare_resume_reply): Replace with macro
9718 target_core_of_thread.
9719 * server.c (handle_qxfer_threads_proper): Likewise.
9720 * target.h (traget_core_of_thread): New macro.
9721
71622373
PA
97222012-04-18 Pedro Alves <palves@redhat.com>
9723
9724 * aclocal.m4: Regenerate.
9725 * configure: Regenerate.
9726
80d26939
YQ
97272012-04-16 Yao Qi <yao@codesourcery.com>
9728
9729 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9730 duplicated on address.
9731
42476b70
YQ
97322012-04-16 Yao Qi <yao@codesourcery.com>
9733
9734 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9735 (struct tracepoint_action_ops) <send>: New field.
9736 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9737 (agent_expr_send, x_tracepoint_action_send): New.
9738 (l_tracepoint_action_send): New.
9739 (cmd_qtdp): Download and install tracepoint
9740 according to `use_agent'.
9741 (run_inferior_command): Add one more parameter `len'.
9742 Update callers.
9743 (tracepoint_send_agent): New.
9744 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9745
7bc83639
YQ
97462012-04-16 Yao Qi <yao@codesourcery.com>
9747
9748 * tracepoint.c (download_tracepoints): Moved to ...
9749 (cmd_qtstart): ... here.
9750
5f18041e
YQ
97512012-04-14 Yao Qi <yao@codesourcery.com>
9752
9753 * tracepoint.c: Include inttypes.h.
9754 (struct collect_memory_action): Use sized types.
9755 (struct tracepoint): Likewise.
9756 (cmd_qtdp, stop_tracing): Update print specifiers.
9757 (cmd_qtp, response_tracepoint): Likewise.
9758 (collect_data_at_tracepoint): Likewise.
9759 (collect_data_at_step): Likewise.
9760
55a8c076
YQ
97612012-04-14 Yao Qi <yao@codesourcery.com>
9762
9763 Import gnulib module inttypes.
9764 * aclocal.m4, config.in, configure: Regenerated.
9765
dc750257
YQ
97662012-04-14 Yao Qi <yao@codesourcery.com>
9767
9768 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9769 Makefile and config.status at last.
9770
0ab5faf9
YQ
97712012-04-13 Yao Qi <yao@codesourcery.com>
9772
9773 * tracepoint.c: Include stdint.h unconditionally.
9774
18f5fd81
TJB
97752012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9776
9777 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9778 on BFD_HAVE_SYS_PROCFS_TYPE.
9779 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9780 * configure: Regenerate.
9781 * config.in: Likewise.
9782
4d47af5c
L
97832012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9784
9785 * Makefile.in (clean): Also remove x32.c x32-linux.c
9786 x32-avx.c x32-avx-linux.c.
9787 (x32.o): New target.
9788 (x32.c): Likewise.
9789 (x32-linux.o): Likewise.
9790 (x32-linux.c): Likewise.
9791 (x32-avx.o): Likewise.
9792 (x32-avx.c): Likewise.
9793 (x32-avx-linux.o): Likewise.
9794 (x32-avx-linux.c): Likewise.
9795
9796 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9797 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9798 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9799 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9800 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9801 i386/x32-avx-linux.xml.
9802
9803 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9804 (init_registers_x32_avx_linux): Likwise.
9805 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9806 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9807
ecedbe58
PA
98082012-04-13 Pedro Alves <palves@redhat.com>
9809
9810 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9811 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9812 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9813 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9814 the sub-make.
9815
c92b5177
L
98162012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9817
9818 * linux-x86-low.c (compat_x32_clock_t): New.
9819 (compat_x32_siginfo_t): Likewise.
9820 (compat_x32_siginfo_from_siginfo): Likewise.
9821 (siginfo_from_compat_x32_siginfo): Likewise.
9822 (linux_is_elf64): Likewise.
9823 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9824 and siginfo_from_compat_x32_siginfo for x32.
9825 (x86_arch_setup): Set linux_is_elf64.
9826
214d508e
L
98272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9828
9829 PR gdb/13969
9830 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9831 e_machine field.
9832 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9833 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9834 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9835 compatible with process.
9836
c9a1864a
YQ
98372012-04-12 Yao Qi <yao@codesourcery.com>
9838
9839 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9840 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9841 (install-only, install-info, clean): Handle sub dir gnulib.
9842 (all-lib, am--refresh): New targets.
9843 (memmem.o): Remove target.
9844 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9845 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9846 (AC_REPLACE_FUNCS): Remove memmem.
9847 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9848 (AC_OUTPUT): Generate Makefile in gnulib/.
9849 * aclocal.m4, config.in, configure: Regenerated.
9850
367ba2c2
MR
98512012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9852
9853 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9854
9d236627
PA
98552012-04-05 Pedro Alves <palves@redhat.com>
9856
9857 -Werror=strict-aliasing
9858
9859 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9860 pointer.
9861
111217b3
PA
98622012-04-04 Pedro Alves <palves@redhat.com>
9863
9864 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9865 (sparc_store_gregset_from_stack, sparc_store_gregset)
9866 (sparc_breakpoint_at): Fix formatting.
9867
8365dcf5
TJB
98682012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9869
9870 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9871 are available.
9872 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9873 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9874 * config.in: Regenerate.
9875 * configure: Likewise.
9876
689cc2ae
PA
98772012-03-29 Pedro Alves <palves@redhat.com>
9878
9879 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9880 Correct ptrace arguments.
9881
c14dfd32
PA
98822012-03-28 Pedro Alves <palves@redhat.com>
9883
9884 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9885 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9886 (IA64_FR1_REGNUM): New defines.
9887 (ia64_fetch_register): New.
9888 (the_low_target): Install it.
9889 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9890 field.
9891 * linux-low.c (linux_fetch_registers): Try the
9892 the_low_target.fetch_register hook first.
9893
9894 * linux-arm-low.c (the_low_target): Adjust.
9895 * linux-bfin-low.c (the_low_target): Adjust.
9896 * linux-cris-low.c (the_low_target): Adjust.
9897 * linux-crisv32-low.c (the_low_target): Adjust.
9898 * linux-m32r-low.c (the_low_target): Adjust.
9899 * linux-m68k-low.c (the_low_target): Adjust.
9900 * linux-mips-low.c (the_low_target): Adjust.
9901 * linux-ppc-low.c (the_low_target): Adjust.
9902 * linux-s390-low.c (the_low_target): Adjust.
9903 * linux-sh-low.c (the_low_target): Adjust.
9904 * linux-sparc-low.c (the_low_target): Adjust.
9905 * linux-tic6x-low.c (the_low_target): Adjust.
9906 * linux-x86-low.c (the_low_target): Adjust.
9907 * linux-xtensa-low.c (the_low_target): Adjust.
9908
63c88e13
PA
99092012-03-26 Pedro Alves <palves@redhat.com>
9910
9911 * server.c (handle_qxfer_libraries): Don't bail early if
9912 the_target->qxfer_libraries_svr4 is not NULL.
9913
fb723180
PA
99142012-03-26 Pedro Alves <palves@redhat.com>
9915
9916 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9917
0afae3cf
PA
99182012-03-23 Pedro Alves <palves@redhat.com>
9919
9920 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9921 "library-list-svr4" element's start tag when the the DSO list is
9922 empty.
9923
485f1ee4
PA
99242012-03-23 Pedro Alves <palves@redhat.com>
9925
9926 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9927 a variable whose type size is the same as the inferior's pointer
9928 size.
9929
a5362b9a
TS
99302012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9931
9932 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9933 struct siginfo.
9934 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9935 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9936 * linux-low.h: Include <signal.h>.
9937 (struct siginfo): Remove forward declaration.
9938 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9939 struct siginfo.
9940
d226c142
MF
99412012-03-21 Mike Frysinger <vapier@gentoo.org>
9942
9943 * .gitignore: Ignore more files.
9944
122f36ef
PA
99452012-03-19 Pedro Alves <palves@redhat.com>
9946 Jan Kratochvil <jan.kratochvil@redhat.com>
9947
9948 * server.c (cont_thread, general_thread): Add describing comments.
9949 (start_inferior): Clear `cont_thread'.
9950 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9951 of a process.
9952
fc3e5175
YQ
99532012-03-15 Yao Qi <yao@codesourcery.com>
9954
9955 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9956 handling to ...
9957 (cmd_qtdp): ... here.
9958
8d0d92cd
YQ
99592012-03-15 Yao Qi <yao@codesourcery.com>
9960
9961 * tracepoint.c (struct tracepoint_action_ops): New.
9962 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9963 (m_tracepoint_action_download): New.
9964 (r_tracepoint_action_download): New.
9965 (x_tracepoint_action_download): New.
9966 (l_tracepoint_action_download): New.
9967 (add_tracepoint_action): Install `action->ops' according type.
9968 (download_tracepoint_1): Move code `download' function pointer
9969 of various tracepoint_action_ops.
9970
87b0bb13
JK
99712012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9972
9973 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9974 linux_ptrace_attach_warnings.
9975
5f572dec
JK
99762012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9977
9978 * Makefile.in (linux-ptrace.o): New.
9979 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9980 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9981 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9982 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9983 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9984 of these targets.
9985 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9986
f4647387
YQ
99872012-03-08 Yao Qi <yao@codesourcery.com>
9988 Pedro Alves <palves@redhat.com>
9989
9990 Fix PR server/13392.
9991 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9992 offset of JMP insn.
9993 * tracepoint.c (remove_tracepoint): New.
9994 (cmd_qtdp): Call remove_tracepoint when failed to install.
9995
9b224c5e
PA
99962012-03-07 Pedro Alves <palves@redhat.com>
9997
9998 * linux-low.c (get_detach_signal): New.
9999 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10000 Pass on pending signals to PTRACE_DETACH. Check the result of the
10001 ptrace call.
10002 * server.c (program_signals, program_signals_p): New.
10003 (handle_general_set): Handle QProgramSignals.
10004 * server.h (program_signals, program_signals_p): Declare.
10005
e237a7e2
JK
100062012-03-05 Pedro Alves <palves@redhat.com>
10007 Jan Kratochvil <jan.kratochvil@redhat.com>
10008
10009 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10010 New comment why.
10011
5808517f
YQ
100122012-03-03 Yao Qi <yao@codesourcery.com>
10013
10014 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10015 agent_look_up_symbols.
10016
58b4daa5
YQ
100172012-03-03 Yao Qi <yao@codesourcery.com>
10018
10019 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10020 (linux-x86-low.o): Likewise.
10021 * server.h: Remove in_process_agent_loaded.
10022 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10023 common/agent.c.
10024 Update callers.
10025
8ffcbaaf
YQ
100262012-03-03 Yao Qi <yao@codesourcery.com>
10027
10028 * tracepoint.c (gdb_agent_capability): New global.
10029 (in_process_agent_loaded_ust): Renamed to
10030 `in_process_agent_supports_ust'.
10031 Update callers.
10032 (in_process_agent_supports_ust): Call agent_capability_check.
10033 (clear_installed_tracepoints): Assert that agent supports
10034 agent.
10035
d1feda86
YQ
100362012-03-03 Yao Qi <yao@codesourcery.com>
10037
10038 * linux-low.c (linux_supports_agent): New.
10039 (linux_target_ops): Initialize field `supports_agent' with
10040 linux_supports_agent.
10041 * target.h (struct target_ops) <supports_agent>: New.
10042 (target_supports_agent): New macro.
10043 * server.c (handle_general_set): Handle packet 'QAgent'.
10044 (handle_query): Send `QAgent+'.
10045 * Makefile.in (server.o): Depends on agent.h.
10046
2fa291ac
YQ
100472012-03-03 Yao Qi <yao@codesourcery.com>
10048
10049 * Makefile.in (OBS): Add agent.o.
10050 Add new rule for agent.o.
10051 Track dependence of tracepoint.c on agent.h.
10052 * tracepoint.c (run_inferior_command_1):
10053 (run_inferior_command): Call agent_run_command.
10054 (gdb_ust_connect_sync_socket): Deleted. Move it to
10055 common/agent.c.
10056 (resume_thread, stop_thread): Likewise.
10057 (gdb_ust_socket_init): Renamed to ...
10058 (gdb_agent_socket_init): ... New.
10059 (gdb_ust_thread): Renamed to ...
10060 (gdb_agent_helper_thread): ... New.
10061 (gdb_ust_init): Move some code to ...
10062 (gdb_agent_init): ... here. New.
10063 [HAVE_UST]: Call gdb_ust_init.
10064 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10065 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10066 * config.in, configure: Regenerated.
10067
05044653
PA
100682012-03-02 Pedro Alves <palves@redhat.com>
10069
10070 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10071 * linux-low.c (struct simple_pid_list): New.
10072 (stopped_pids): New a struct simple_pid_list pointer.
10073 (add_to_pid_list, pull_pid_from_list): New.
10074 (handle_extended_wait): Don't assume the first signal new children
10075 report is SIGSTOP. Adjust call to pull_pid_from_list.
10076 (linux_wait_for_lwp): Adjust.
10077
8d00225b
YQ
100782012-03-02 Yao Qi <yao@codesourcery.com>
10079
10080 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10081 debug log.
10082
19560ba5
YQ
100832012-03-02 Yao Qi <yao@codesourcery.com>
10084
10085 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10086 `stop_pc' and `tpoint'. Update caller.
10087
1faeff08
MR
100882012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10089
10090 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10091 * linux-low.c (use_linux_regsets): New macro.
10092 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10093 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10094 (linux_register_in_regsets): New function.
10095 (usr_fetch_inferior_registers): Skip registers covered by
10096 regsets.
10097 (usr_store_inferior_registers): Likewise.
10098 (usr_fetch_inferior_registers): New macro.
10099 (usr_store_inferior_registers): Likewise.
10100 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10101 (linux_store_registers): Likewise.
10102 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10103 prototype.
10104 (init_registers_mips64_dsp_linux): Likewise.
10105 (init_registers_mips_linux): New macro.
10106 (init_registers_mips_dsp_linux): Likewise.
10107 (mips_dsp_num_regs): Likewise.
10108 (DSP_BASE, DSP_CONTROL): New fallback macros.
10109 (mips_base_regs): New macro.
10110 (mips_regmap): Use it. Fix the size.
10111 (mips_dsp_regmap): New variable.
10112 (mips_dsp_regset_bitmap): Likewise.
10113 (mips_arch_setup): New function.
10114 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10115 than mips_regmap.
10116 (mips_cannot_store_register): Likewise.
10117 (the_low_target): Update .arch_setup, .num_regs and .regmap
10118 initializers. Add .regset_bitmap initializer.
10119 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10120 initializer.
10121 * linux-bfin-low.c (the_low_target): Likewise.
10122 * linux-cris-low.c (the_low_target): Likewise.
10123 * linux-crisv32-low.c (the_low_target): Likewise.
10124 * linux-ia64-low.c (the_low_target): Likewise.
10125 * linux-m32r-low.c (the_low_target): Likewise.
10126 * linux-m68k-low.c (the_low_target): Likewise.
10127 * linux-ppc-low.c (the_low_target): Likewise.
10128 * linux-s390-low.c (the_low_target): Likewise.
10129 * linux-sh-low.c (the_low_target): Likewise.
10130 * linux-sparc-low.c (the_low_target): Likewise.
10131 * linux-tic6x-low.c (the_low_target): Likewise.
10132 * linux-x86-low.c (the_low_target): Likewise.
10133 * linux-xtensa-low.c (the_low_target): Likewise.
10134 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10135 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10136 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10137 srv_xmlfiles.
10138 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10139 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10140
c03e6ccc
YQ
101412012-02-29 Yao Qi <yao@codesourcery.com>
10142 Pedro Alves <palves@redhat.com>
10143
10144 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10145 `step_over_finished' is true.
10146
644cebc9
PA
101472012-02-27 Pedro Alves <palves@redhat.com>
10148
10149 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10150 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10151
c14d7ab2
PA
101522012-02-27 Pedro Alves <palves@redhat.com>
10153
10154 PR server/9684
10155 * linux-low.c (pid_is_stopped): New.
10156 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10157
412c89dd
LM
101582012-02-25 Luis Machado <lgustavo@codesourcery.com>
10159
10160 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10161 of conditions.
10162
b745defe
MR
101632012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10164
10165 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10166
9f3a5c85
LM
101672012-02-24 Luis Machado <lgustavo@codesourcery>
10168
10169 * server.c (handle_query): Advertise support for target-side
10170 breakpoint condition evaluation.
10171 (process_point_options): New function.
10172 (process_serial_event): When inserting a breakpoint, check for
10173 a target-side condition that should be evaluated.
10174
10175 * mem-break.c: Include regcache.h and ax.h.
10176 (point_cond_list_t): New data structure.
10177 (breakpoint) <cond_list>: New field.
10178 (find_gdb_breakpoint_at): Make non-static.
10179 (delete_gdb_breakpoint_at): Clear any target-side
10180 conditions.
10181 (clear_gdb_breakpoint_conditions): New function.
10182 (add_condition_to_breakpoint): Likewise.
10183 (add_breakpoint_condition): Likewise.
10184 (gdb_condition_true_at_breakpoint): Likewise.
10185 (gdb_breakpoint_here): Return result directly instead
10186 of going through a local variable.
10187
10188 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10189 (clear_gdb_breakpoint_conditions): Likewise.
10190 (add_breakpoint_condition): Likewise.
10191 (gdb_condition_true_at_breakpoint): Likewise.
10192
10193 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10194 (need_step_over_p): Take target-side breakpoint condition into
10195 consideration.
10196
5e1dc496
LM
101972012-02-24 Luis Machado <lgustavo@codesourcery>
10198
10199 * server.h: Include tracepoint.h.
10200 (agent_mem_read, agent_get_trace_state_variable_value,
10201 agent_set_trace_state_variable_value,
10202 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10203 get_set_tsv_func_addr): New prototypes.
10204
10205 * ax.h: New include file.
10206 * ax.c: New source file.
10207
10208 * tracepoint.c: Include ax.h.
10209 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10210 agent_expr, eval_result_type): Move to ax.h.
10211 (parse_agent_expr): Rename to ...
10212 (gdb_parse_agent_expr): ... this, make it non-static and move
10213 to ax.h.
10214 (unparse_agent_expr) Rename to ...
10215 (gdb_unparse_agent_expr): ... this, make it non-static and move
10216 to ax.h.
10217 (eval_agent_expr): Rename to ...
10218 (eval_tracepoint_agent_expr): ... this.
10219 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10220 forward declarations.
10221 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10222 (agent_get_trace_state_variable_value): New function.
10223 (agent_set_trace_state_variable_value): New function.
10224 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10225 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10226 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10227 (condition_true_at_tracepoint): Likewise.
10228 (parse_agent_expr): Rename to ...
10229 (gdb_parse_agent_expr): ... this and move to ax.c.
10230 (unparse_agent_expr): Rename to ...
10231 (gdb_unparse_agent_expr): ... this and move to ax.c.
10232 (gdb_agent_op_name): Move to ax.c.
10233 (eval_agent_expr): Rename to ...
10234 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10235 and move to ax.c.
10236 (eval_tracepoint_agent_expr): New function.
10237 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10238 non-static.
5e1dc496
LM
10239 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10240 ax.c.
10241 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10242 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10243 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10244 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10245 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10246 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10247 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10248 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10249 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10250 (compile_bytecodes): Remove forward declaration.
10251 (is_goto_target): Move to ax.c.
10252 (compile_bytecodes): Move to ax.c and call
10253 agent_get_trace_state_variable_value (...) and
10254 agent_set_trace_state_variable_value (...).
10255
10256 * Makefile.in: Update ax.c and IPA dependencies.
10257
277e4e52
PA
102582012-02-24 Pedro Alves <palves@redhat.com>
10259
10260 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10261 (cmd_bigqtbuffer_circular): ... this. Only handle
10262 'QTBuffer:circular:'.
10263 (handle_tracepoint_general_set): Adjust.
10264
bf4c19f7
YQ
102652012-02-16 Yao Qi <yao@codesourcery.com>
10266
10267 * inferiors.c: Move code to ...
10268 * dll.c: .... here. New.
10269 * server.h: Declare clear_dlls.
10270 * Makefile.in (SFILES): Add dll.c.
10271 (OBS): Add dll.o
10272 (dll.o): New rule.
10273
d73f2619
YQ
102742012-02-11 Yao Qi <yao@codesourcery.com>
10275
10276 * server.c: (handle_monitor_command): Add a new parameter
10277 `own_buf'.
10278 (handle_query): Update caller.
10279
f8255c2a
JB
102802012-02-09 Joel Brobecker <brobecker@adacore.com>
10281
10282 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10283 * configure, config.in: Regenerate.
10284 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10285 is not defined.
10286
da84f473
PA
102872012-02-02 Pedro Alves <palves@redhat.com>
10288
10289 Try SIGKILL first, then PTRACE_KILL.
10290 * linux-low.c (linux_kill_one_lwp): New.
10291 (linux_kill_one_lwp): Rename to ...
10292 (kill_one_lwp_callback): ... this. Use the new
10293 linux_kill_one_lwp.
10294
e886a173
PA
102952012-02-02 Pedro Alves <palves@redhat.com>
10296
10297 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10298 inferior.
10299
be07f1a2
PA
103002012-01-27 Pedro Alves <palves@redhat.com>
10301
10302 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10303 (elf_64_file_p): Make static.
10304 (linux_pid_exe_is_elf_64_file): New.
10305 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10306 Delete declarations.
10307 (linux_pid_exe_is_elf_64_file): Declare.
10308 * linux-x86-low.c (x86_arch_setup): Use
10309 linux_pid_exe_is_elf_64_file.
10310
d8301ad1
JK
103112012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10312
10313 * linux-low.c (linux_wait_for_event_1): Rename to ...
10314 (linux_wait_for_event): ... here and merge it with former
10315 linux_wait_for_event - new variable wait_ptid, use it.
10316 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10317
01b17894
PA
103182012-01-23 Pedro Alves <palves@redhat.com>
10319
10320 * server.c (main): Avoid yet another case of infinite loop while
10321 detaching/killing after a longjmp.
10322
e825046f
JK
103232012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10324
10325 Code cleanup.
10326 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10327
b9e7b9c3
UW
103282012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10329
10330 * hostio.c (handle_readlink): New function.
10331 (handle_vFile): Call it to handle "vFile:readlink" packets.
10332
901f9912
UW
103332012-01-20 Pedro Alves <palves@redhat.com>
10334 Ulrich Weigand <ulrich.weigand@linaro.org>
10335
10336 * server.c (handle_v_requests): Only support vAttach and vRun to
10337 start multiple processes when in extended protocol mode.
10338
fc1ab1a0
PA
103392012-01-17 Pedro Alves <palves@redhat.com>
10340
10341 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10342 memalign plus mprotect to allocate the scratch buffer.
10343
7d5d4e98
PA
103442012-01-13 Pedro Alves <palves@redhat.com>
10345
10346 * server.c (attach_inferior): Clear `cont_thread'.
10347
f128d5e9
PA
103482012-01-13 Pedro Alves <palves@redhat.com>
10349
10350 * server.c (main): Avoid infinite loop while detaching/killing
10351 after a longjmp.
10352
06db92f0
DE
103532012-01-09 Doug Evans <dje@google.com>
10354
10355 * server.c (start_inferior): Set last_ptid in --wrapper case.
10356
32d92999
YQ
103572012-01-06 Yao Qi <yao@codesourcery.com>
10358
10359 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10360 defined.
10361 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10362
5e0a92a9
YQ
103632012-01-04 Yao Qi <yao@codesourcery.com>
10364
10365 * tracepoint.c (cmd_qtdp): Print debug message
10366 for static tracepoint.
10367
ae639e8c
YQ
103682012-01-04 Yao Qi <yao@codesourcery.com>
10369
10370 * tracepoint.c (trace_vdebug): Differentiate debug message
10371 between gdbserver and IPA.
10372
f72429c5
YQ
103732012-01-03 Yao Qi <yao@codesourcery.com>
10374
10375 * tracepoint.c (tracepoint_was_hit): Don't collect for
10376 static tracepoint.
10377
12c3e59c
JB
103782012-01-02 Joel Brobecker <brobecker@adacore.com>
10379
10380 * terminal.h: Reformat copyright header.
10381
67827812
JB
103822012-01-02 Joel Brobecker <brobecker@adacore.com>
10383
10384 * server.c (gdbserver_version): Update copyright year.
10385 * gdbreplay.c (gdbreplay_version): Likewise.
10386
3e52c33d
JK
103872011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10388
10389 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10390
10391 Revert:
10392 2011-12-18 Hui Zhu <teawater@gmail.com>
10393 * linux-low.c (linux_create_inferior): Save return value to ret.
10394
66f1260e
HZ
103952011-12-18 Hui Zhu <teawater@gmail.com>
10396
10397 * linux-low.c (linux_create_inferior): Save return value to ret.
10398
e77616d7
DE
103992011-12-16 Doug Evans <dje@google.com>
10400
e7b06c57
DE
10401 * linux-low.c (linux_create_inferior): If stdio connection,
10402 redirect stdin from /dev/null, stdout to stderr.
10403 * remote-utils.c (remote_is_stdio): New static global.
10404 (remote_connection_is_stdio): New function.
10405 (remote_prepare): Handle stdio connection.
10406 (remote_open): Ditto.
10407 (remote_close): Don't close stdin for stdio connections.
10408 (read_prim,write_prim): New functions. Replace all calls to
10409 read/write to these.
10410 * server.c (main): Watch for "-" argument. Move call to
10411 remote_prepare before start_inferior.
10412 * server.h (STDIO_CONNECTION_NAME): New macro.
10413 (remote_connection_is_stdio): Declare.
10414
e77616d7
DE
10415 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10416 in debugging output.
10417
82067193
YQ
104182011-12-15 Yao Qi <yao@codesourcery.com>
10419
10420 * tracepoint.c: Include sys/syscall.h.
10421 (gdb_ust_thread): Remove preprocessor conditional.
10422
82bfbe7e
PA
104232011-12-14 Pedro Alves <pedro@codesourcery.com>
10424
10425 * linux-low.c (linux_detach_one_lwp): Call
10426 the_low_target.prepare_to_resume before detaching.
10427
712c6575
YQ
104282011-12-14 Yao Qi <yao@codesourcery.com>
10429
10430 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10431 of write.
10432
d54d1edf
YQ
104332011-12-14 Yao Qi <yao@codesourcery.com>
10434
10435 * i386-low.c (i386_low_stopped_data_address): Initialize local
10436 variable `control'.
10437
6210a125
PA
104382011-12-13 Pedro Alves <pedro@codesourcery.com>
10439
10440 PR remote/13492
10441
10442 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10443 DR_CONTROL unless necessary. Extend comments.
10444 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10445 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10446
2ece8244
YQ
104472011-12-13 Yao Qi <yao@codesourcery.com>
10448
10449 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10450 macros.
10451 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10452
784867a5
JK
104532011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10454
10455 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10456 Print new debug message for such case.
10457
6bf36717
JK
104582011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10459
10460 Fix overlapping memcpy.
10461 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10462 the read_inferior_memory transfer.
10463 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10464 write_inferior_memory transfer.
10465 (set_fast_tracepoint_jump): New variable buf. Use it for the
10466 read_inferior_memory and write_inferior_memory transfers.
10467 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10468 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10469 Use it for the write_inferior_memory transfer.
10470 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10471 buffers.
10472
50275556
MR
104732011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10474
10475 * linux-low.c (fetch_register, store_register): Make code
10476 consistent, fix formatting.
10477
7325beb4
MR
104782011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10479
10480 * linux-low.c (usr_store_inferior_registers): Factor out code
10481 to handle individual registers into...
10482 (store_register): ... this new function.
10483
c642a434
UW
104842011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10485
10486 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10487 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10488 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10489 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10490 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10491 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10492 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10493 (srv_xmlfiles): Add new XML files.
10494
10495 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10496 and <sys/uio.h>.
10497 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10498 (init_registers_s390_linux32v1): Add prototype.
10499 (init_registers_s390_linux32v2): Likewise.
10500 (init_registers_s390_linux64v1): Likewise.
10501 (init_registers_s390_linux64v2): Likewise.
10502 (init_registers_s390x_linux64v1): Likewise.
10503 (init_registers_s390x_linux64v2): Likewise.
10504 (s390_num_regs): Increment to 52.
10505 (s390_regmap): Add orig_r2 register.
10506 (s390_num_regs_3264): Increment to 68.
10507 (s390_regmap_3264): Add orig_r2 register.
10508 (s390_collect_ptrace_register): Handle orig_r2 register.
10509 (s390_supply_ptrace_register): Likewise.
10510 (s390_fill_last_break): New function.
10511 (s390_store_last_break): Likewise.
10512 (s390_fill_system_call): New function.
10513 (s390_store_system_call): Likewise.
10514 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10515 register sets.
10516 (s390_check_regset): New function.
10517 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10518 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10519 Update target_regsets for available register sets.
10520
2268b414
JK
105212011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10522 Jan Kratochvil <jan.kratochvil@redhat.com>
10523
10524 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10525 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10526 New.
10527 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10528 * linux-low.h (struct process_info_private): New member r_debug.
10529 * server.c (handle_qxfer_libraries): Call
10530 the_target->qxfer_libraries_svr4.
10531 (handle_qxfer_libraries_svr4): New function.
10532 (qxfer_packets): New entry "libraries-svr4".
10533 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10534 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10535 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10536 PACKET_qXfer_libraries_svr4.
10537
d6db1fab
UW
105382011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10539
10540 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10541 PSW address/mask between 8-byte and 16-byte formats.
10542 (s390_supply_ptrace_register): Likewise.
10543 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10544 basic addressing mode bit.
10545
242f5f1c
SS
105462011-11-24 Stan Shebs <stan@codesourcery.com>
10547
10548 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10549
f196051f
SS
105502011-11-17 Stan Shebs <stan@codesourcery.com>
10551
10552 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10553 (tracing_start_time): New global.
10554 (tracing_stop_time): New global.
10555 (tracing_user_name): New global.
10556 (tracing_notes): New global.
10557 (tracing_stop_note): New global.
10558 (cmd_qtstart): Set traceframe_usage, start_time.
10559 (stop_tracing): Set stop_time.
10560 (cmd_qtstatus): Report additional status.
10561 (cmd_qtp): New function.
10562 (handle_tracepoint_query): Call it.
10563 (cmd_qtnotes): New function.
10564 (handle_tracepoint_general_set): Call it.
10565 (get_timestamp): Rename from tsv_get_timestamp.
10566
405f8e94
SS
105672011-11-14 Stan Shebs <stan@codesourcery.com>
10568 Kwok Cheung Yeung <kcy@codesourcery.com>
10569
10570 * linux-x86-low.c (small_jump_insn): New.
10571 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10572 trampoline and error message, build a trampoline and issue a small
10573 jump instruction to it.
10574 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10575 trampoline and error message.
10576 (x86_get_min_fast_tracepoint_insn_len): New.
10577 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10578 * linux-low.h (struct linux_target_ops): Add arguments to
10579 install_fast_tracepoint_jump_pad operation, add new operation.
10580 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10581 arguments.
10582 (linux_get_min_fast_tracepoint_insn_len): New function.
10583 (linux_target_op): Add new operation.
10584 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10585 (gdb_trampoline_buffer_end): Ditto.
10586 (gdb_trampoline_buffer_error): Ditto.
10587 (struct ipa_sym_addresses): Add fields for new IPA variables.
10588 (symbol_list): Add entries for new IPA variables.
10589 (struct tracepoint): Add fields to hold the address range of the
10590 trampoline used by the tracepoint.
10591 (trampoline_buffer_head): New static variable.
10592 (trampoline_buffer_tail): Ditto.
10593 (claim_trampoline_space): New function.
10594 (have_fast_tracepoint_trampoline_buffer): New function.
10595 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10596 structure.
10597 (install_fast_tracepoint): Ditto, also add error buffer argument.
10598 (cmd_qtminftpilen): New function.
10599 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10600 (fast_tracepoint_from_trampoline_address): New function.
10601 (fast_tracepoint_collecting): Handle trampoline as part of jump
10602 pad space.
10603 (set_trampoline_buffer_space): New function.
10604 (initialize_tracepoint): Initialize new IPA variables.
10605 * target.h (struct target_ops): Add arguments to
10606 install_fast_tracepoint_jump_pad operation, add new
10607 get_min_fast_tracepoint_insn_len operation.
10608 (target_get_min_fast_tracepoint_insn_len): New.
10609 (install_fast_tracepoint_jump_pad): Add arguments.
10610 * server.h (IPA_BUFSIZ): Define.
10611 * linux-i386-ipa.c: Include extra header files.
10612 (initialize_fast_tracepoint_trampoline_buffer): New function.
10613 (initialize_low_tracepoint): Call it.
10614 * server.h (set_trampoline_buffer_space): Declare.
10615 (claim_trampoline_space): Ditto.
10616 (have_fast_tracepoint_trampoline_buffer): Ditto.
10617
1e4d1764
YQ
106182011-11-14 Yao Qi <yao@codesourcery.com>
10619
10620 * server.c (handle_query): Handle InstallInTrace for qSupported.
10621 * tracepoint.c (add_tracepoint): Sort list.
10622 (install_tracepoint, download_tracepoint): New.
10623 (cmd_qtdp): Call them to install and download tracepoints.
10624 (sort_tracepoints): Removed.
10625 (cmd_qtstart): Update.
10626
5c73ff4e
YQ
106272011-11-14 Yao Qi <yao@codesourcery.com>
10628
10629 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10630 * mem-break.h: Declare.
10631 * tracepoint.c (cmd_qtstart): Move some code to ...
10632 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10633 New.
10634 (download_tracepoints): Move some code to ...
10635 (download_tracepoint_1): ... here. New.
10636
86a30030
YQ
106372011-11-08 Yao Qi <yao@codesourcery.com>
10638
10639 * remote-utils.c (relocate_instruction): A comment fix.
10640
8d26e50c
JB
106412011-11-07 Joel Brobecker <brobecker@adacore.com>
10642
10643 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10644 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10645 dr_status_mirror and dr_control_mirror from debug_reg_state.
10646 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10647 (i386_initial_stuff): Remove use of deleted globals.
10648 (i386_get_thread_context, i386_set_thread_context,
10649 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10650 from debug_reg_state.
10651
a59306a3
YQ
106522011-11-05 Yao Qi <yao@codesourcery.com>
10653
10654 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10655 address as TPOINT's.
10656
3065dfb6
SS
106572011-11-02 Stan Shebs <stan@codesourcery.com>
10658
10659 * tracepoint.c (agent_mem_read_string): New function.
10660 (eval_agent_expr): Call it for tracenz.
10661 * server.c (handle_query): Report support for tracenz.
10662
fd0d8c7c
YQ
106632011-11-02 Yao Qi <yao@codesourcery.com>
10664
10665 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10666
609086b1
YQ
106672011-11-02 Yao Qi <yao@codesourcery.com>
10668
10669 * target.h: Fix a typo in comment.
10670
b9fd1791
PA
106712011-10-31 Pedro Alves <pedro@codesourcery.com>
10672
10673 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10674 clobber the breakpoints' shadows with fast tracepoint jumps.
10675 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10676 * target.c (write_inferior_memory): Also pass MYADDR down to
10677 check_mem_write.
10678
03583c20
UW
106792011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10680
10681 * configure.ac: Check support for personality routine.
10682 * configure: Regenerate.
10683 * config.in: Likewise.
10684 * linux-low.c: Include <sys/personality.h>.
10685 Define ADDR_NO_RANDOMIZE if necessary.
10686 (linux_create_inferior): Disable address space randomization when
10687 forking inferior, if requested.
10688 (linux_supports_disable_randomization): New function.
10689 (linux_target_ops): Install it.
10690 * server.h (disable_randomization): Declare.
10691 * server.c (disable_randomization): New global variable.
10692 (handle_general_set): Handle QDisableRandomization.
10693 (handle_query): Likewise for qSupported.
10694 (main): Support --disable-randomization and --no-disable-randomization
10695 command line arguments.
10696 * target.h (struct target_ops): Add supports_disable_randomization.
10697 (target_supports_disable_randomization): New macro.
10698
723b724b
MF
106992011-09-29 Mike Frysinger <vapier@gentoo.org>
10700
10701 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10702 ifdef check.
10703 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10704 [!PT_GETDSBT] (target_loadmap): New definition.
10705 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10706 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10707 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10708 and PT_GETDSBT to LINUX_LOADMAP.
10709 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10710 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10711
55329a5c 107122011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10713
10714 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10715 (arm_linux_hwbp_cap): New static variable.
10716 (arm_linux_get_hwbp_cap): Replace by ...
10717 (arm_linux_init_hwbp_cap): ... this new function.
10718 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10719 (arm_linux_get_hw_watchpoint_count): Likewise.
10720 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10721 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10722 (arm_prepare_to_resume): Use perror_with_name instead of error.
10723
55329a5c 107242011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10725
10726 * linux-arm-low.c: Include <signal.h>.
10727 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10728 (struct arm_linux_hwbp_cap): New data type.
10729 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10730 (struct arm_linux_hw_breakpoint): New data type.
10731 (MAX_BPTS, MAX_WPTS): Define.
10732 (struct arch_process_info, struct arch_lwp_info): New data types.
10733 (arm_linux_get_hwbp_cap): New function.
10734 (arm_linux_get_hw_breakpoint_count): Likewise.
10735 (arm_linux_get_hw_watchpoint_count): Likewise.
10736 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10737 (arm_hwbp_control_initialize): Likewise.
10738 (arm_hwbp_control_is_enabled): Likewise.
10739 (arm_hwbp_control_is_initialized): Likewise.
10740 (arm_hwbp_control_disable): Likewise.
10741 (arm_linux_hw_breakpoint_equal): Likewise.
10742 (arm_linux_hw_point_initialize): Likewise.
10743 (struct update_registers_data): New data structure.
10744 (update_registers_callback: New function.
10745 (arm_insert_point): Likewise.
10746 (arm_remove_point): Likewise.
10747 (arm_stopped_by_watchpoint): Likewise.
10748 (arm_stopped_data_address): Likewise.
10749 (arm_new_process): Likewise.
10750 (arm_new_thread): Likewise.
10751 (arm_prepare_to_resume): Likewise.
10752 (the_low_target): Register arm_insert_point, arm_remove_point,
10753 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10754 arm_new_thread, and arm_prepare_to_resume.
10755
6b9801d4
SS
107562011-09-15 Stan Shebs <stan@codesourcery.com>
10757
10758 * server.h (struct emit_ops): Add compare-goto fields.
10759 * tracepoint.c (gdb_agent_op_sizes): New table.
10760 (emit_eq_goto): New function.
10761 (emit_ne_goto): New function.
10762 (emit_lt_goto): New function.
10763 (emit_le_goto): New function.
10764 (emit_gt_goto): New function.
10765 (emit_ge_goto): New function.
10766 (is_goto_target): New function.
10767 (compile_bytecodes): Recognize special cases of compare-goto
10768 combinations and call specialized emitters for them.
10769 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10770 (amd64_emit_ne_goto): New function.
10771 (amd64_emit_lt_goto): New function.
10772 (amd64_emit_le_goto): New function.
10773 (amd64_emit_gt_goto): New function.
10774 (amd64_emit_ge_goto): New function.
10775 (amd64_emit_ops): Add the new functions.
10776 (i386_emit_eq_goto): New function.
10777 (i386_emit_ne_goto): New function.
10778 (i386_emit_lt_goto): New function.
10779 (i386_emit_le_goto): New function.
10780 (i386_emit_gt_goto): New function.
10781 (i386_emit_ge_goto): New function.
10782 (i386_emit_ops): Add the new functions.
10783
bf15cbda
SS
107842011-09-08 Stan Shebs <stan@codesourcery.com>
10785
10786 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10787 (i386_emit_epilogue): Restore %ebx.
10788
943ca1dd
JZ
107892011-08-31 Jie Zhang <jzhang918@gmail.com>
10790
10791 * server.c (step_thread): Remove definition.
10792 (process_serial_event): Don't handle Hs.
10793 * server.h (step_thread): Remove declaration.
10794 * target.c (set_desired_inferior): Remove use of step_thread.
10795
e3deef73
LM
107962011-08-24 Luis Machado <lgustavo@codesourcery.com>
10797
10798 * linux-low.c: Include linux-procfs.h.
10799 (linux_attach_lwp_1): Update comments.
10800 (linux_attach): Scan for existing threads when attaching to a
10801 process that is the tgid.
10802 * Makefile.in: Update dependencies.
10803
13da1c97
LM
108042011-08-24 Luis Machado <lgustavo@codesourcery.com>
10805
10806 * configure.srv: Add linux-procfs.o dependencies.
10807
881127c9
YQ
108082011-08-14 Yao Qi <yao@codesourcery.com>
10809
10810 * target.h (struct target_ops): Fix indent.
10811 * win32-low.c (win32_target_ops): Fix comment.
10812
58dbd541
YQ
108132011-08-14 Andrew Jenner <andrew@codesourcery.com>
10814 Yao Qi <yao@codesourcery.com>
10815
10816 * Makefile.in (clean): Remove tic6x-*.c files.
10817 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10818 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10819 (tic6x-c64xp-linux.c): Likewise.
10820 * configure.srv: Add support for tic6x-*-uclinux.
10821 * linux-tic6x-low.c: New.
10822 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10823
78d85199
YQ
108242011-08-14 Andrew Stubbs <ams@codesourcery.com>
10825 Yao Qi <yao@codesourcery.com>
10826
10827 * target.h (struct target_ops): Add read_loadmap.
10828 * linux-low.c (struct target_loadseg): New type.
10829 (struct target_loadmap): New type.
10830 (linux_read_loadmap): New function.
10831 (linux_target_ops): Add linux_read_loadmap.
10832 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10833 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10834 to NULL.
78d85199 10835
a959a88d
EZ
108362011-08-05 Eli Zaretskii <eliz@gnu.org>
10837
10838 * win32-low.c: Include <stdint.h>.
10839
1ced966e
PA
108402011-07-22 Pedro Alves <pedro@codesourcery.com>
10841
10842 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10843 to the inferior here.
10844 (i386_remove_aligned_watchpoint): Ditto.
10845 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10846 fit part of the watchpoint in the debug registers.
10847 (i386_update_inferior_debug_regs): New.
10848 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10849 registers, and only update the inferior on success.
10850 (i386_low_remove_watchpoint): Ditto.
10851
d26e3629
KY
108522011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10853
10854 * linux-low.c (compare_ints, unique, list_threads, show_process,
10855 linux_core_of_thread): Delete.
10856 (linux_target_ops): Change linux_core_of_thread to
10857 linux_common_core_of_thread.
10858 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10859 * utils.c (malloc_failure): Change type of argument.
10860 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10861 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10862 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10863 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10864 (IPA_OBJS): Add common-utils-ipa.o.
10865 (ptid_h, linux_osdata_h): New macros.
10866 (server_h): Add common/common-utils.h, common/xml-utils.h,
10867 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10868 common/ptid.h.
10869 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10870 ptid.o, buffer.o): New rules.
10871 (linux-low.o): Add common/linux-osdata.h as a dependency.
10872 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10873 * configure.ac: Add AC_HEADER_DIRENT check.
10874 * config.in: Regenerate.
10875 * configure: Regenerate.
10876 * remote-utils.c (xml_escape_text): Delete.
10877 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10878 buffer_xml_printf): Move to common/buffer.c.
10879 * server.c (main): Remove call to initialize_inferiors.
10880 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10881 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10882 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10883 internal_error, gdb_assert, gdb_assert_fail): Delete.
10884 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10885 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10886 common/buffer.h.
10887 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10888 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10889 initialize_inferiors): Delete.
10890
2275a1a7
PA
108912011-07-20 Pedro Alves <pedro@codesourcery.com>
10892
10893 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10894 symbol error.
10895
0a5b1e09
PA
108962011-05-31 Pedro Alves <pedro@codesourcery.com>
10897
10898 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10899 assertion.
10900 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10901
6938fd34
YQ
109022011-05-26 Yao Qi <yao@codesourcery.com>
10903
10904 * Makefile.in (thread-db.o): Track dependence to
10905 common/gdb_thread_db.h.
10906 * thread-db.c: include gdb_thread_db.h from right place.
10907
b481f9e0
TT
109082011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10909
10910 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10911 __FILE__ and __LINE__ to internal_error.
10912
98a5dd13
DE
109132011-05-13 Doug Evans <dje@google.com>
10914
10915 * thread-db.c (try_thread_db_load_from_sdir): New function.
10916 (try_thread_db_load_from_dir): New function.
10917 (thread_db_load_search): Handle $sdir, ignore $pdir.
10918 Remove trying of system directories if search of
10919 libthread-db-search-path fails, that is now done via $sdir.
10920
d248b706
KY
109212011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10922
10923 * server.c (handle_query): Add EnableDisableTracepoints to the list
10924 of supported features.
43aaf8b6 10925 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10926 tracepoints.
43aaf8b6
PA
10927 (cmd_qtenable_disable): New.
10928 (cmd_qtstart): Install tracepoints even if disabled.
10929 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10930 receiving a QTEnable or QTDisable packet.
10931 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10932 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10933 tracepoints.
10934 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10935
84e578fb
DE
109362011-05-10 Doug Evans <dje@google.com>
10937
10938 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10939
71f55dd8
DE
109402011-05-04 Doug Evans <dje@google.com>
10941
10942 * linux-low.c (linux_join): Skip process lookup.
10943 * spu-low.c (spu_join): Ditto.
10944 * server.c (join_inferiors_callback): Delete.
10945 (process_serial_event): For 'D' packet (detach) call join_inferior
10946 directly.
10947
4d393d60
JM
109482011-05-04 Joseph Myers <joseph@codesourcery.com>
10949
10950 * README: Don't mention xscale*-*-linux*.
10951 * configure.srv (xscale*-*-linux*): Don't handle target.
10952
b00ad6ff
NF
109532011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10954
10955 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10956 casting pointers.
10957 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10958 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10959 (i386_emit_void_call_2): Likewise.
10960
af96c192
YQ
109612011-04-26 Yao Qi <yao@codesourcery.com>
10962
43aaf8b6
PA
10963 * linux-low.c: Move common macros to linux-ptrace.h.
10964 Include linux-ptrace.h.
af96c192
YQ
10965 * Makefile.in (linux_ptrace_h): New.
10966 (linux-low.o): Depends on linux-ptrace.h.
10967
03f2bd59
JK
109682011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10971 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10972 (remote_prepare): New function with most of the TCP code from ...
10973 (remote_open): ... here. Detect PORT here unconditionally. Move also
10974 setting transport_is_reliable.
10975 * server.c (run_once): New variable.
10976 (gdbserver_usage): Document it.
10977 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10978 the first run if RUN_ONCE.
10979 * server.h (run_once, remote_prepare): New declarations.
10980
7a9dd1b2
TT
109812011-04-19 Tom Tromey <tromey@redhat.com>
10982
10983 * win32-low.c (handle_load_dll): Remove duplicate "the".
10984
81239425
PM
109852011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10986
10987 Remove support for old Cygwin 1.5 versions.
10988 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10989 function to avoid warning.
10990 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10991 warning.
10992
9e0627f1
PM
109932011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10994
10995 * gdbserver/server.h (Macro _): Define it if not available.
10996
588eebee
MS
109972011-03-14 Michael Snyder <msnyder@vmware.com>
10998
348af9f7 10999 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11000
43f70d4c
JB
110012011-03-10 Joel Brobecker <brobecker@adacore.com>
11002
11003 * Makefile.in (maintainer-clean realclean distclean): Remove
11004 "make ... subdir_do" command.
11005
348af9f7
MS
110062011-03-10 Michael Snyder <msnyder@vmware.com>
11007
11008 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11009
11010 * server.c (handle_v_run): Free alloced buffer on early return.
11011
e637a4f5
YQ
110122011-03-09 Yao Qi <yao@codesourcery.com>
11013
11014 Revert:
11015 2011-03-04 Yao Qi <yao@codesourcery.com>
11016
11017 * Makefile.in: Remove GNU make feature --directory.
11018
11019 2011-03-05 Yao Qi <yao@codesourcery.com>
11020
11021 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11022 (subdir_do): New make target. Copied from gdb/Makefile.
11023 (maintainer-clean, realclean, distclean, clean): Call corresponding
11024 make targets in common/Makefile.
11025
11026 2011-02-11 Yao Qi <yao@codesourcery.com>
11027
11028 * configure.ac: Call AC_PROG_RANLIB.
11029 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11030 * configure: Regenerate.
11031
e6edda56
JK
110322011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11033
11034 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11035
e5141119
JB
110362011-03-06 Yao Qi <yao@codesourcery.com>
11037
11038 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11039
64794aa4
JB
110402011-03-05 Yao Qi <yao@codesourcery.com>
11041
11042 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11043 (subdir_do): New make target. Copied from gdb/Makefile.
11044 (maintainer-clean, realclean, distclean, clean): Call corresponding
11045 make targets in common/Makefile.
11046
7a762829
YQ
110472011-03-04 Yao Qi <yao@codesourcery.com>
11048
11049 * Makefile.in: Remove GNU make feature --directory.
11050
348af9f7
MS
110512011-03-04 Michael Snyder <msnyder@vmware.com>
11052
11053 * server.c (queue_stop_reply): Call xmalloc not malloc.
11054
110552011-03-02 Michael Snyder <msnyder@vmware.com>
11056
11057 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11058
9f72fee2
MS
110592011-02-28 Michael Snyder <msnyder@vmware.com>
11060
588eebee
MS
11061 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11062 (cmd_qtframe): Ditto.
11063 (cmd_qtbuffer): Ditto.
11064 (cmd_bigqtbuffer): Ditto.
11065
9f72fee2
MS
11066 * utils.c (decimal2str): Initialize 'width' to nine, then
11067 don't mess with it.
11068
8040bd49
UW
110692011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11070
11071 * hostio.c (require_data): Free *data, not data.
11072
7e52cbd0
JK
110732011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11074
11075 * hostio.c (require_data): Use free, not xfree.
11076
9130f83e
MS
110772011-02-27 Michael Snyder <msnyder@vmware.com>
11078
4b812f4e
MS
11079 * server.c (handle_query): Discard unused value.
11080
9130f83e
MS
11081 * hostio.c (require_data): Free malloc memory before returning
11082 error.
11083
69d37113
MS
110842011-02-26 Michael Snyder <msnyder@vmware.com>
11085
11086 * linux-low.c (list_threads): Call closedir for dirent.
11087
35f5825a
MS
110882011-02-27 Michael Snyder <msnyder@vmware.com>
11089
2a589cef
MS
11090 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11091 a case statement falls through.
11092
0adea5f7
MS
11093 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11094
35f5825a
MS
11095 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11096 in comparison.
11097
238f1c74
MS
110982011-02-26 Michael Snyder <msnyder@vmware.com>
11099
11100 * utils.c (decimal2str): Eliminate dead code and dead param.
11101 (pulongest): Drop dead param from call to decimal2str.
11102 (plongest): Ditto.
11103
633ff500
JB
111042011-02-24 Joel Brobecker <brobecker@adacore.com>
11105
11106 Revert the following patch (not approved yet):
11107 2011-02-21 Hui Zhu <teawater@gmail.com>
11108 * tracepoint.c (tp_printf): New function.
11109 (eval_agent_expr): Handle gdb_agent_op_printf.
11110
f9c6ff72
HZ
111112011-02-21 Hui Zhu <teawater@gmail.com>
11112
11113 * tracepoint.c (tp_printf): New function.
11114 (eval_agent_expr): Handle gdb_agent_op_printf.
11115
94d5e490
TT
111162011-02-18 Tom Tromey <tromey@redhat.com>
11117
11118 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11119 (tracepoint.o): Likewise.
11120 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11121 (gdb_agent_op_names): Likewise.
11122
c7f96d2b
TT
111232011-02-18 Tom Tromey <tromey@redhat.com>
11124
11125 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11126 gdb_agent_op_rot>: New constants.
11127 (gdb_agent_op_names): Add pick and roll.
11128 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11129 cases.
11130
0feedb2c
JK
111312011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11132
11133 * aclocal.m4: Regenerated with aclocal-1.11.1.
11134
b3b9301e
PA
111352011-02-14 Pedro Alves <pedro@codesourcery.com>
11136
11137 * server.c (handle_qxfer_traceframe_info): New.
11138 (qxfer_packets): Register "traceframe-info".
11139 (handle_query): Report support for qXfer:traceframe-info:read+.
11140 * tracepoint.c (match_blocktype): New.
11141 (traceframe_find_block_type): Rename to ...
11142 (traceframe_walk_blocks): ... this. Add callback filter argument,
11143 and use it.
11144 (traceframe_find_block_type): New, reimplemented on top of
11145 traceframe_walk_blocks.
11146 (build_traceframe_info_xml): New.
11147 (traceframe_read_info): New.
11148 * server.h (traceframe_read_info): Declare.
11149
4f3e6fb7
YQ
111502011-02-11 Yao Qi <yao@codesourcery.com>
11151
11152 * configure.ac: Call AC_PROG_RANLIB.
11153 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11154 * configure: Regenerate.
11155
764880b7
PA
111562011-02-07 Pedro Alves <pedro@codesourcery.com>
11157
11158 * server.c (gdb_read_memory): Change return semantics to allow
11159 partial transfers.
11160 (handle_search_memory_1): Adjust.
11161 (process_serial_event) <'m' packet>: Handle partial transfers.
11162 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11163
1c79eb8a
PA
111642011-01-28 Pedro Alves <pedro@codesourcery.com>
11165
11166 * regcache.c (init_register_cache): Initialize
11167 regcache->register_status.
11168 (free_register_cache): Release regcache->register_status.
11169 (regcache_cpy): Copy register_status.
11170 (registers_to_string): Print 'x's for unavailable registers.
11171 (supply_register): Mark the register's status valid or
11172 unavailable, depending on whether a buffer was passed in or not.
11173 (supply_register_zeroed): New.
11174 (supply_regblock): Mark the registers' status valid or
11175 unavailable, depending on whether a buffer was passed in or not.
11176 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11177 (struct regcache): New `register_status' field.
11178 (supply_register_zeroed): Declare.
11179 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11180 supply_register_zeroed, rather than passing a NULL buffer to
11181 supply_register.
11182 * tracepoint.c (fetch_traceframe_registers): Update comment.
11183
85724a0e
PA
111842011-01-28 Pedro Alves <pedro@codesourcery.com>
11185
11186 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11187 buffer explicit.
11188
d08aafef
PA
111892011-01-25 Pedro Alves <pedro@codesourcery.com>
11190
11191 * server.h (decode_xfer_write): Change prototype.
11192 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11193 and don't extract the annex here.
11194 * server.c (decode_xfer_read): Remove `annex' parameter,
11195 and don't extract the annex here.
11196 (decode_xfer): New.
11197 (struct qxfer): New.
11198 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11199 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11200 (handle_qxfer_statictrace): New functions, abstracted out from
11201 handle_query, and made to use the struct qxfer interface.
11202 (handle_threads_qxfer_proper): Rename to ...
11203 (handle_qxfer_threads_proper): ... this.
11204 (handle_threads_qxfer): Rename to ...
11205 (handle_qxfer_threads): ... this. Adjust.
11206 (qxfer_packets): New array.
11207 (handle_qxfer): New function.
11208 (handle_query): Use handle_qxfer.
11209
493e2a69
MS
112102011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11211
11212 * gdbreplay.c: Shorten lines of >= 80 columns.
11213 * linux-low.c: Ditto.
11214 * linux-ppc-low.c: Ditto.
11215 * linux-s390-low.c: Ditto.
11216 * linux-sparc-low.c: Ditto.
11217 * linux-x86-low.c: Ditto.
11218 * linux-xtensa-low.c: Ditto.
11219 * mem-break.c: Ditto.
11220 * nto-low.c: Ditto.
11221 * regcache.h: Ditto.
11222 * remote-utils.c: Ditto.
11223 * server.c: Ditto.
11224 * server.h: Ditto.
11225 * thread-db.c: Ditto.
11226 * tracepoint.c: Ditto.
11227 * utils.c: Ditto.
11228 * win32-low.h: Ditto.
11229
44944448
JB
112302011-01-05 Joel Brobecker <brobecker@adacore.com>
11231
11232 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11233 update.
11234
71ce852c
JB
112352011-01-01 Joel Brobecker <brobecker@adacore.com>
11236
11237 * server.c (gdbserver_version): Update copyright year in version
11238 output.
11239 * gdbreplay.c (gdbreplay_version): Ditto.
11240
eb826dc6
MF
112412010-12-29 Jie Zhang <jie.zhang@analog.com>
11242
11243 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11244 * linux-bfin-low.c: New file.
11245 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11246 PT_DATA_ADDR for BFIN targets.
11247 * Makefile.in (SFILES): Add linux-bfin-low.c.
11248 (clean): Remove reg-bfin.c.
11249 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11250 * README: Mention supported Blackfin targets.
11251
39ab222a
MF
112522010-12-23 Mike Frysinger <vapier@gentoo.org>
11253
11254 * .gitignore: New file.
11255
a1f2ce7d
MF
112562010-11-16 Mike Frysinger <vapier@gentoo.org>
11257
11258 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11259
f474844c
JZ
112602010-10-22 Jie Zhang <jie@codesourcery.com>
11261
11262 * Makefile.in: Add FLAGS_TO_PASS variable.
11263 (install): Remove dependency of install-only and recursively
11264 invoke make for install-only.
11265
f1048712
DE
112662010-10-04 Doug Evans <dje@google.com>
11267
11268 * Makefile.in (uninstall): Use $(DESTDIR).
11269
b53a1623
PA
112702010-09-24 Pedro Alves <pedro@codesourcery.com>
11271
e6ee044d
PA
11272 PR gdb/11842
11273
b53a1623
PA
11274 * linux-x86-low.c (compat_siginfo_from_siginfo)
11275 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11276 si_code is < 0. Check for si_code == SI_TIMER before checking for
11277 si_code < 0.
11278
fa1bd1e4
JB
112792010-09-13 Joel Brobecker <brobecker@adacore.com>
11280
11281 * lynx-i386-low.c: New file.
11282 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11283
47fac8f8
JB
112842010-09-13 Joel Brobecker <brobecker@adacore.com>
11285
11286 * lynx-low.c (ptrace_request_to_str): Remove handling for
11287 request values that have been removed in LynxOS 5.x.
11288
1adfc54d
JB
112892010-09-13 Joel Brobecker <brobecker@adacore.com>
11290
11291 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11292 <ptrace.h>
11293
c2a66c29
NS
112942010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11295
11296 * configure.ac: Add --enable-inprocess-agent option.
11297 * configure: Rebuilt.
11298
32fcada3
YQ
112992010-09-06 Yao Qi <yao@codesourcery.com>
11300
11301 * linux-low.c (linux_kill): Remove unused variable.
11302 (linux_stabilize_threads): Likewise.
11303 * server.c (start_inferior): Likewise.
11304 (queue_stop_reply_callback): Likewise.
11305 * tracepoint.c (do_action_at_tracepoint): Likewise.
11306
0cccb683
YQ
113072010-09-06 Yao Qi <yao@codesourcery.com>
11308
11309 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11310 on return.
11311
423ec54c
JK
113122010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11313
11314 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11315
12ac6819
PA
113162010-09-06 Pedro Alves <pedro@codesourcery.com>
11317
11318 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11319 "$(IPA_DEPFILES)".
11320
8ed54b31
JB
113212010-09-01 Joel Brobecker <brobecker@adacore.com>
11322
11323 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11324 gdbserver/lynx-ppc-low.c: New files.
11325 * Makefile.in (lynx_low_h): New variable.
11326 (lynx-low.o, lynx-ppc-low.o): New rules.
11327 * configure.ac: On LynxOS, link with -lnetinet.
11328 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11329 * configure: regenerate.
11330
bb0116a4
JB
113312010-09-01 Joel Brobecker <brobecker@adacore.com>
11332
11333 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11334 * configure.ac: Add check for vasprintf and vsnprintf.
11335 * configure, config.in: Regenerate.
11336 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11337
a778ab81 113382010-09-01 Joel Brobecker <brobecker@adacore.com>
11339
11340 * gdbreplay.c: Move include of alloca.h up, next to include of
11341 malloc.h.
11342 * server.h: Add include of malloc.h.
11343 * mem-break.c: Remove include of malloc.h.
11344 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11345
8b034a19 113462010-09-01 Joel Brobecker <brobecker@adacore.com>
11347
11348 * Makefile.in (memmem.o): Build with -Wno-error.
11349
113502010-09-01 Joel Brobecker <brobecker@adacore.com>
11351
11352 * utils.c (xsnprintf): Make non-static.
11353 * server.h: Add xsnprintf declaration.
11354 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11355 replace calls to snprintf by calls to xsnprintf throughout.
11356
113572010-09-01 Joel Brobecker <brobecker@adacore.com>
11358
11359 * configure.ac: Add configure check for alloca.
11360 * configure, config.in: Regenerate.
11361 * server.h: Include alloca.h if it exists.
11362 * gdbreplay.c: Include alloca.h if it exists.
11363
1a981360
PA
113642010-08-28 Pedro Alves <pedro@codesourcery.com>
11365
11366 * linux-low.c (__SIGRTMIN): Define if not already defined.
11367 (linux_create_inferior): Check for __ANDROID__ rather than
11368 __SIGRTMIN.
11369 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11370 are already deferred.
11371 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11372 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11373 stopped and already has a pending signal to report.
11374 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11375 a pending signal to report or is moving out of a jump pad.
11376 (linux_init_signals): Check for __ANDROID__ rather than
11377 __SIGRTMIN.
11378
b4d51a55
PA
113792010-08-28 Pedro Alves <pedro@codesourcery.com>
11380
11381 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11382 debug_threads check. Avoid a linear search when not doing debug
11383 output.
11384
ec48365d
PA
113852010-08-27 Pedro Alves <pedro@codesourcery.com>
11386
11387 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11388 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11389 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11390 (process_event): Change local fd's type to gdb_fildes_t.
11391 (create_file_handler): Adjust prototype.
11392 (delete_file_handler): Adjust prototype.
11393 (handle_file_event): Adjust prototype. Use pfildes.
11394 (create_file_event): Adjsut prototype.
11395 * remote-utils.c (remote_desc, listen_desc): Change type to
11396 gdb_fildes_t.
11397 * server.h: New gdb_fildes_t typedef.
11398 [USE_WIN32API]: Include winsock2.h.
11399 (delete_file_handler, add_file_handler): Adjust prototypes.
11400 (pfildes): Declare.
11401 * utils.c (pfildes): New.
11402
854d88f0
PA
114032010-08-27 Pedro Alves <pedro@codesourcery.com>
11404
11405 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11406 * configure: Regenerate.
11407
0146f85b
PA
114082010-08-27 Pedro Alves <pedro@codesourcery.com>
11409
11410 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11411 (linux_done_accessing_memory): ... this.
11412 (linux_target_ops): Adjust.
11413 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11414 * nto-low.c (nto_target_ops): Adjust comment.
11415 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11416 * spu-low.c (spu_target_ops): Adjust comment.
11417 * target.h (target_ops): Rename unprepare_to_access_memory field
11418 to done_accessing_memory.
11419 (unprepare_to_access_memory): Rename to ...
11420 (done_accessing_memory): ... this.
11421
90d74c30
PA
114222010-08-26 Pedro Alves <pedro@codesourcery.com>
11423
11424 * linux-low.c (linux_prepare_to_access_memory): New.
11425 (linux_unprepare_to_access_memory): New.
11426 (linux_target_ops): Install them.
11427 * server.c (read_memory): Rename to ...
11428 (gdb_read_memory): ... this. Use
11429 prepare_to_access_memory/prepare_to_access_memory.
11430 (write_memory): Rename to ...
11431 (gdb_write_memory): ... this. Use
11432 prepare_to_access_memory/prepare_to_access_memory.
11433 (handle_search_memory_1): Adjust.
11434 (process_serial_event): Adjust.
11435 * target.h (struct target_ops): New fields
11436 prepare_to_access_memory and unprepare_to_access_memory.
11437 (prepare_to_access_memory, unprepare_to_access_memory): New.
11438 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11439 prepare_to_access_memory/prepare_to_access_memory.
11440 * nto-low.c (nto_target_ops): Adjust.
11441 * spu-low.c (spu_target_ops): Adjust.
11442 * win32-low.c (win32_target_ops): Adjust.
11443
fd467969
PA
114442010-08-26 Pedro Alves <pedro@codesourcery.com>
11445
11446 * Makefile.in (WARN_CFLAGS): Get it from configure.
11447 (WERROR_CFLAGS): New.
11448 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11449 * configure.ac: Introduce --enable-werror, which adds -Werror to
11450 the compiler command line. Enabled by default. Disable with
11451 --disable-werror. Add -Wdeclaration-after-statement
11452 Wpointer-arith and -Wformat-nonliteral to warning flags.
11453 * configure: Regenerate.
11454
331e2f5f
PA
114552010-08-26 Pedro Alves <pedro@codesourcery.com>
11456
11457 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11458
e581f2b4
PA
114592010-08-26 Pedro Alves <pedro@codesourcery.com>
11460
11461 * gdbreplay.c (remote_error): New.
11462 (gdbchar): New.
11463 (expect): Use gdbchar. Check for error reading from GDB.
11464 Clarify sync error output.
11465 (play): Check for errors writing to GDB.
11466 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11467 * remote-utils.c (getpkt): Check for errors writing to the remote
11468 descriptor.
11469
3c11dd79
PA
114702010-08-25 Pedro Alves <pedro@codesourcery.com>
11471
11472 * linux-low.c (linux_wait_1): Move non-debugging code out of
11473 `debug_threads' control.
11474
d20a8ad9
PA
114752010-08-25 Pedro Alves <pedro@codesourcery.com>
11476
11477 * linux-low.c (linux_wait_1): Don't set last_status here.
11478 * server.c (push_event, queue_stop_reply_callback): Assert we're
11479 not pushing a TARGET_WAITKIND_IGNORE event.
11480 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11481 (myresume, handle_target_event): Set the thread's last_resume_kind
11482 and last_status from the target returned status.
11483
964e4306
PA
114842010-08-25 Pedro Alves <pedro@codesourcery.com>
11485
11486 PR threads/10729
11487
11488 * linux-x86-low.c (update_debug_registers_callback): New.
11489 (i386_dr_low_set_addr): Use it.
11490 (i386_dr_low_get_addr): New.
11491 (i386_dr_low_set_control): Use update_debug_registers_callback.
11492 (i386_dr_low_get_control): New.
11493 (i386_dr_low_get_status): Adjust.
11494 * linux-low.c (linux_stop_lwp): New.
11495 * linux-low.h (linux_stop_lwp): Declare.
11496
11497 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11498 argument instead of a i386_debug_reg_state.
11499 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11500 a i386_debug_reg_state.
11501 (i386_insert_aligned_watchpoint): Adjust.
11502 (i386_remove_aligned_watchpoint): Adjust.
11503 (i386_low_stopped_data_address): Read the debug registers from the
11504 inferior instead of from the mirrors.
11505 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11506 (i386_dr_low_get_addr): Declare.
11507 (i386_dr_low_get_control): Declare.
11508 (i386_dr_low_get_status): Change prototype.
11509
11510 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11511 (i386_dr_low_get_addr): New.
11512 (i386_dr_low_get_control): New.
11513 (i386_dr_low_get_status): Adjust prototype. Return
11514 dr_status_mirror.
11515 (i386_initial_stuff): Clear dr_status_mirror and
11516 dr_control_mirror.
11517 (i386_get_thread_context): Adjust.
11518 (i386_set_thread_context): Adjust.
11519 (i386_thread_added): Adjust.
11520
5f21a75b
PA
115212010-08-24 Pedro Alves <pedro@codesourcery.com>
11522
11523 * linux-low.h (linux_thread_area): Delete declaration.
11524
3e4c1235
TS
115252010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11526
11527 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11528 after its termination.
11529
1971b033
PA
115302010-08-09 Pedro Alves <pedro@codesourcery.com>
11531
11532 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11533 (gdb_wants_all_stopped): Delete.
11534 (linux_wait_1): Don't call them.
11535 * server.c (handle_v_cont): Tag all threads as want-stopped.
11536 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11537 stopped as "client-wants-stopped".
11538
310444ac
PA
115392010-07-31 Pedro Alves <pedro@codesourcery.com>
11540
11541 * Makefile.in (signals_h): New.
11542 (server_h): Depend on it.
11543 (server.o): Don't depend on $(signals_def).
11544 (signals.o): Depend on $(signals_def).
11545
a19cae16
JK
115462010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11547
11548 * Makefile.in (signals_def): New.
11549 (server_h): Append include/gdb/signals.h and signals_def.
11550 (server.o): Append signals_def.
11551
30d50328
JK
115522010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11553
11554 * server.c (handle_target_event): Use target_signal_to_host for
11555 resume_info.sig initialization.
11556 * target.h (struct thread_resume) <sig>: New comment.
11557
5c3216e2
OS
115582010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11559
c6f46ca0
OS
11560 * server.c (handle_query): strcpy() the returned string from paddress()
11561 instead of sprintf().
5c3216e2
OS
11562 * utils.c (paddress): Return phex_nz().
11563
6bd31874
JB
115642010-07-07 Joel Brobecker <brobecker@adacore.com>
11565
11566 * server.c (handle_v_cont): Call mourn_inferior if process
11567 just exited.
11568 (myresume): Likewise.
11569
0fb4aa4b
PA
115702010-07-01 Pedro Alves <pedro@codesourcery.com>
11571
11572 Static tracepoints, and integration with UST.
11573
11574 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11575 * mem-break.c (uninsert_all_breakpoints)
11576 (reinsert_all_breakpoints): New.
11577 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11578 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11579 (gdb_agent_ust_loaded, helper_thread_id)
11580 (gdb_agent_helper_thread_id): New macros.
11581 (struct ipa_sym_addresses): Add addr_ust_loaded,
11582 addr_helper_thread_id, addr_cmd_buf.
11583 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11584 (in_process_agent_loaded_ust): New.
11585 (write_e_ust_not_loaded): New.
11586 (maybe_write_ipa_ust_not_loaded): New.
11587 (struct collect_static_trace_data_action): New.
11588 (enum tracepoint_type) <static_tracepoint>: New.
11589 (struct tracepoint) <handle>: Mention static tracepoints.
11590 (struct static_tracepoint_ctx): New.
11591 (CMD_BUF_SIZE): New.
11592 (add_tracepoint_action): Handle static tracepoint actions.
11593 (unprobe_marker_at): New.
11594 (clear_installed_tracepoints): Handle static tracepoints.
11595 (cmd_qtdp): Handle static tracepoints.
11596 (probe_marker_at): New.
11597 (cmd_qtstart): Handle static tracepoints.
11598 (response_tracepoint): Handle static tracepoints.
11599 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11600 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11601 (get_context_regcache): Handle static tracepoints.
11602 (do_action_at_tracepoint): Handle static tracepoint actions.
11603 (traceframe_find_block_type): Handle static trace data blocks.
11604 (traceframe_read_sdata): New.
11605 (download_tracepoints): Download static tracepoint actions.
11606 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11607 (GDB_PROBE_NAME): New.
11608 (ust_ops): New.
11609 (GET_UST_SYM): New.
11610 (USTF): New.
11611 (dlsym_ust): New.
11612 (ust_marker_to_static_tracepoint): New.
11613 (gdb_probe): New.
11614 (collect_ust_data_at_tracepoint): New.
11615 (gdb_ust_probe): New.
11616 (UNIX_PATH_MAX, SOCK_DIR): New.
11617 (gdb_ust_connect_sync_socket): New.
11618 (resume_thread, stop_thread): New.
11619 (run_inferior_command): New.
11620 (init_named_socket): New.
11621 (gdb_ust_socket_init): New.
11622 (cstr_to_hexstr): New.
11623 (next_st): New.
11624 (first_marker, next_marker): New.
11625 (response_ust_marker): New.
11626 (cmd_qtfstm, cmd_qtsstm): New.
11627 (unprobe_marker_at, probe_marker_at): New.
11628 (cmd_qtstmat, gdb_ust_thread): New.
11629 (gdb_ust_init): New.
11630 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11631 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11632 (ST_REGENTRY): New.
11633 (x86_64_st_collect_regmap): New.
11634 (X86_64_NUM_ST_COLLECT_GREGS): New.
11635 (AMD64_RIP_REGNUM): New.
11636 (supply_static_tracepoint_registers): New.
11637 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11638 (ST_REGENTRY): New.
11639 (i386_st_collect_regmap): New.
11640 (i386_NUM_ST_COLLECT_GREGS): New.
11641 (supply_static_tracepoint_registers): New.
11642 * server.c (handle_query): Handle qXfer:statictrace:read.
11643 <qSupported>: Report support for StaticTracepoints, and
11644 qXfer:statictrace:read features.
11645 * server.h (traceframe_read_sdata)
11646 (supply_static_tracepoint_registers): Declare.
11647 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11648 (unpack_varlen_hex): Include in IPA build.
11649 * Makefile.in (ustlibs, ustinc): New.
11650 (IPA_OBJS): Add remote-utils-ipa.o.
11651 ($(IPA_LIB)): Link -ldl and -lpthread.
11652 (UST_CFLAGS): New.
11653 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11654 * config.in, configure: Regenerate.
11655
9e4344e5
PA
116562010-06-20 Ian Lance Taylor <iant@google.com>
11657 Pedro Alves <pedro@codesourcery.com>
11658
11659 * linux-x86-low.c (always_true): Delete.
11660 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11661 trying to fool the compiler with always_true.
11662
c6beb2cb
PA
116632010-06-20 Pedro Alves <pedro@codesourcery.com>
11664
11665 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11666 conditions in gdbserver.
11667
d2ed6730
UW
116682010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11669
11670 * spu-low.c (spu_read_memory): Wrap around local store limit.
11671 (spu_write_memory): Likewise.
11672
4e29fb54
PA
116732010-06-15 Pedro Alves <pedro@codesourcery.com>
11674
11675 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11676 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11677 LONGEST uses.
11678 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11679 uses.
11680 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11681 uses with LONGEST uses.
11682
6a271cae
PA
116832010-06-14 Stan Shebs <stan@codesourcery.com>
11684 Pedro Alves <pedro@codesourcery.com>
11685
11686 Bytecode compiler.
11687
11688 * linux-x86-low.c: Include limits.h.
11689 (add_insns): New.
11690 (always_true): New.
11691 (EMIT_ASM): New.
11692 (EMIT_ASM32): New.
11693 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11694 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11695 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11696 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11697 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11698 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11699 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11700 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11701 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11702 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11703 (amd64_emit_void_call_2): New.
11704 (amd64_emit_ops): New.
11705 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11706 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11707 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11708 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11709 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11710 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11711 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11712 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11713 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11714 (i386_emit_stack_adjust, i386_emit_int_call_1)
11715 (i386_emit_void_call_2): New.
11716 (i386_emit_ops): New.
11717 (x86_emit_ops): New.
11718 (the_low_target): Install x86_emit_ops.
11719 * server.h (struct emit_ops): New.
11720 (get_raw_reg_func_addr): Declare.
11721 (current_insn_ptr, emit_error): Declare.
11722 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11723 (set_trace_state_variable_value): New defines.
11724 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11725 addr_get_trace_state_variable_value and
11726 addr_set_trace_state_variable_value.
11727 (symbol_list): New fields for get_raw_reg,
11728 get_trace_state_variable_value and set_trace_state_variable_value.
11729 (condfn): New typedef.
11730 (struct tracepoint): New field `compiled_cond'.
11731 (do_action_at_tracepoint): Clear compiled_cond.
11732 (get_trace_state_variable_value, set_trace_state_variable_value):
11733 Export in the IPA.
11734 (condition_true_at_tracepoint): If there's a compiled condition,
11735 run that.
11736 (current_insn_ptr, emit_error): New globals.
11737 (struct bytecode_address): New.
11738 (get_raw_reg_func_addr): New.
11739 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11740 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11741 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11742 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11743 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11744 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11745 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11746 (compile_tracepoint_condition, compile_bytecodes): New.
11747 * target.h (emit_ops): Forward declare.
11748 (struct target_ops): New field emit_ops.
11749 (target_emit_ops): New.
11750 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11751 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11752 * linux-low.c (linux_emit_ops): New.
11753 (linux_target_ops): Install it.
11754 * linux-low.h (struct linux_target_ops): New field emit_ops.
11755
92b72907
UW
117562010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11757
11758 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11759 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11760
fa593d66
PA
117612010-06-01 Pedro Alves <pedro@codesourcery.com>
11762 Stan Shebs <stan@codesourcery.com>
11763
11764 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11765 (all): Depend on $(extra_libraries).
11766 (install-only): Install the IPA.
11767 (IPA_OBJS, IPA_LIB): New.
11768 (clean): Remove the IPA lib.
11769 (IPAGENT_CFLAGS): New.
11770 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11771 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11772 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11773 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11774 * configure.ac: Check for atomic builtins support in the compiler.
11775 (IPA_DEPFILES, extra_libraries): Define.
11776 * configure.srv (ipa_obj): Add description.
11777 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11778 (i[34567]86-*-linux*): Set ipa_obj.
11779 (x86_64-*-linux*): Set ipa_obj.
11780 * linux-low.c (stabilizing_threads): New.
11781 (supports_fast_tracepoints): New.
11782 (linux_detach): Stabilize threads before detaching.
11783 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11784 the lwp is either not stabilizing, or is moving out of a jump pad.
11785 (linux_fast_tracepoint_collecting): New.
11786 (maybe_move_out_of_jump_pad): New.
11787 (enqueue_one_deferred_signal): New.
11788 (dequeue_one_deferred_signal): New.
11789 (linux_wait_for_event_1): If moving out of a jump pad, defer
11790 pending signals to later.
11791 (linux_stabilize_threads): New.
11792 (linux_wait_1): Check if threads need moving out of jump pads, and
11793 do it if so.
11794 (stuck_in_jump_pad_callback): New.
11795 (move_out_of_jump_pad_callback): New.
11796 (lwp_running): New.
11797 (linux_resume_one_lwp): Handle moving out of jump pads.
11798 (linux_set_resume_request): Dequeue deferred signals.
11799 (need_step_over_p): Also step over fast tracepoint jumps.
11800 (start_step_over): Also uninsert fast tracepoint jumps.
11801 (finish_step_over): Also reinsert fast tracepoint jumps.
11802 (linux_install_fast_tracepoint_jump): New.
11803 (linux_target_ops): Install linux_stabilize_threads and
11804 linux_install_fast_tracepoint_jump_pad.
11805 * linux-low.h (linux_target_ops) <get_thread_area,
11806 install_fast_tracepoint_jump_pad>: New fields.
11807 (struct lwp_info) <collecting_fast_tracepoint,
11808 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11809 (linux_get_thread_area): Declare.
11810 * linux-x86-low.c (jump_insn): New.
11811 (x86_get_thread_area): New.
11812 (append_insns): New.
11813 (push_opcode): New.
11814 (amd64_install_fast_tracepoint_jump_pad): New.
11815 (i386_install_fast_tracepoint_jump_pad): New.
11816 (x86_install_fast_tracepoint_jump_pad): New.
11817 (the_low_target): Install x86_get_thread_area and
11818 x86_install_fast_tracepoint_jump_pad.
11819 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11820 (struct fast_tracepoint_jump): New.
11821 (fast_tracepoint_jump_insn): New.
11822 (fast_tracepoint_jump_shadow): New.
11823 (find_fast_tracepoint_jump_at): New.
11824 (fast_tracepoint_jump_here): New.
11825 (delete_fast_tracepoint_jump): New.
11826 (set_fast_tracepoint_jump): New.
11827 (uninsert_fast_tracepoint_jumps_at): New.
11828 (reinsert_fast_tracepoint_jumps_at): New.
11829 (set_breakpoint_at): Use write_inferior_memory.
11830 (uninsert_raw_breakpoint): Use write_inferior_memory.
11831 (check_mem_read): Mask out fast tracepoint jumps.
11832 (check_mem_write): Mask out fast tracepoint jumps.
11833 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11834 (set_fast_tracepoint_jump): Declare.
11835 (delete_fast_tracepoint_jump)
11836 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11837 (reinsert_fast_tracepoint_jumps_at): Declare.
11838 * regcache.c: Don't compile many functions when building the
11839 in-process agent library.
11840 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11841 the register buffer in the heap.
11842 (free_register_cache): If the register buffer isn't owned by the
11843 regcache, don't free it.
11844 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11845 pre-existing register caches.
11846 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11847 type.
11848 (convert_ascii_to_int): : Constify `from' parameter type.
11849 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11850 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11851 the needed buffer in-place.
11852 (relocate_instruction): New.
11853 * server.c (handle_query) <qSymbols>: If the target supports
11854 tracepoints, give it a chance of looking up symbols. Report
11855 support for fast tracepoints.
11856 (handle_status): Stabilize threads.
11857 (process_serial_event): Adjust.
11858 * server.h (struct fast_tracepoint_jump): Forward declare.
11859 (struct process_info) <fast_tracepoint_jumps>: New field.
11860 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11861 (decode_X_packet, decode_M_packet): Adjust.
11862 (relocate_instruction): Declare.
11863 (in_process_agent_loaded): Declare.
11864 (tracepoint_look_up_symbols): Declare.
11865 (struct fast_tpoint_collect_status): Declare.
11866 (fast_tracepoint_collecting): Declare.
11867 (force_unlock_trace_buffer): Declare.
11868 (handle_tracepoint_bkpts): Declare.
11869 (initialize_low_tracepoint)
11870 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11871 * target.h (struct target_ops) <stabilize_threads,
11872 install_fast_tracepoint_jump_pad>: New fields.
11873 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11874 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11875 [HAVE_STDINT_H]: Include stdint.h.
11876 (trace_debug_1): Rename to ...
11877 (trace_vdebug): ... this.
11878 (trace_debug): Rename to ...
11879 (trace_debug_1): ... this. Add `level' parameter.
11880 (trace_debug): New.
11881 (ATTR_USED, ATTR_NOINLINE): New.
11882 (IP_AGENT_EXPORT): New.
11883 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11884 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11885 (about_to_request_buffer_space, trace_buffer_is_full)
11886 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11887 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11888 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11889 (traceframe_write_count, traceframes_created)
11890 (trace_state_variables)
11891 New renaming defines.
11892 (struct ipa_sym_addresses): New.
11893 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11894 (symbol_list): New.
11895 (ipa_sym_addrs): New.
11896 (all_tracepoint_symbols_looked_up): New.
11897 (in_process_agent_loaded): New.
11898 (write_e_ipa_not_loaded): New.
11899 (maybe_write_ipa_not_loaded): New.
11900 (tracepoint_look_up_symbols): New.
11901 (debug_threads) [IN_PROCESS_AGENT]: New.
11902 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11903 (UNKNOWN_SIDE_EFFECTS): New.
11904 (stop_tracing): New.
11905 (flush_trace_buffer): New.
11906 (stop_tracing_bkpt): New.
11907 (flush_trace_buffer_bkpt): New.
11908 (read_inferior_integer): New.
11909 (read_inferior_uinteger): New.
11910 (read_inferior_data_pointer): New.
11911 (write_inferior_data_pointer): New.
11912 (write_inferior_integer): New.
11913 (write_inferior_uinteger): New.
11914 (struct collect_static_trace_data_action): Delete.
11915 (enum tracepoint_type): New.
11916 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11917 <actions_str, step_actions, step_actions_str>: Only include in
11918 GDBserver.
fa593d66
PA
11919 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11920 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11921 (tracepoints): Use IP_AGENT_EXPORT.
11922 (last_tracepoint): Don't include in the IPA.
11923 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11924 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11925 (alloced_trace_state_variables): New.
11926 (trace_state_variables): Use IP_AGENT_EXPORT.
11927 (traceframe_t): Delete unused variable.
11928 (circular_trace_buffer): Don't include in the IPA.
11929 (trace_buffer_start): Delete.
11930 (struct trace_buffer_control): New.
11931 (trace_buffer_free): Delete.
11932 (struct ipa_trace_buffer_control): New.
11933 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11934 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11935 New.
11936 (trace_buffer_ctrl): New.
11937 (TRACE_BUFFER_CTRL_CURR): New.
11938 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11939 Reimplement as macros.
11940 (trace_buffer_wrap): Delete.
11941 (traceframe_write_count, traceframe_read_count)
11942 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11943 (struct tracepoint_hit_ctx) <type>: New field.
11944 (struct fast_tracepoint_ctx): New.
11945 (memory_barrier): New.
11946 (cmpxchg): New.
11947 (record_tracepoint_error): Update atomically in the IPA.
11948 (clear_inferior_trace_buffer): New.
11949 (about_to_request_buffer_space): New.
11950 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11951 updating the same buffer.
11952 (add_tracepoint): Default the tracepoint's type to trap
11953 tracepoint, and orig_size to -1.
11954 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11955 internal variables.
11956 (create_trace_state_variable): New parameter `gdb'. Handle it.
11957 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11958 (cmd_qtdp): Handle fast tracepoints.
11959 (cmd_qtdv): Adjust.
11960 (max_jump_pad_size): New.
11961 (gdb_jump_pad_head): New.
11962 (get_jump_space_head): New.
11963 (claim_jump_space): New.
11964 (sort_tracepoints): New.
11965 (MAX_JUMP_SIZE): New.
11966 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11967 IPA.
11968 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11969 support. Upload fast traceframes, and delete internal IPA
11970 breakpoints.
11971 (stop_tracing_handler): New.
11972 (flush_trace_buffer_handler): New.
11973 (cmd_qtstop): Upload fast tracepoints.
11974 (response_tracepoint): Handle fast tracepoints.
11975 (tracepoint_finished_step): Upload fast traceframes. Set the
11976 tracepoint hit context's tracepoint type.
11977 (handle_tracepoint_bkpts): New.
11978 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11979 type. Add comment about fast tracepoints.
11980 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11981 non-existing action_str field.
11982 (get_context_regcache): Handle fast tracepoints.
11983 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11984 to the regcache.
11985 (fast_tracepoint_from_jump_pad_address): New.
11986 (fast_tracepoint_from_ipa_tpoint_address): New.
11987 (collecting_t): New.
11988 (force_unlock_trace_buffer): New.
11989 (fast_tracepoint_collecting): New.
11990 (collecting): New.
11991 (gdb_collect): New.
11992 (write_inferior_data_ptr): New.
11993 (target_tp_heap): New.
11994 (target_malloc): New.
11995 (download_agent_expr): New.
11996 (UALIGN): New.
11997 (download_tracepoints): New.
11998 (download_trace_state_variables): New.
11999 (upload_fast_traceframes): New.
12000 (IPA_FIRST_TRACEFRAME): New.
12001 (IPA_NEXT_TRACEFRAME_1): New.
12002 (IPA_NEXT_TRACEFRAME): New.
12003 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12004 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12005 (gdb_jump_pad_buffer_end): New.
12006 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12007 (initialize_tracepoint): Adjust.
12008 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12009 buffer. Initialize the low module.
12010 * utils.c (PREFIX, TOOLNAME): New.
12011 (malloc_failure): Use PREFIX.
12012 (error): In the IPA, an error causes an exit.
12013 (fatal, warning): Use PREFIX.
12014 (internal_error): Use TOOLNAME.
12015 (NUMCELLS): Increase to 10.
12016 * configure, config.in: Regenerate.
12017
d149dd1d
PA
120182010-06-01 Pedro Alves <pedro@codesourcery.com>
12019
12020 * server.c (handle_query) <qSupported>: Do two passes over the
12021 qSupported string to avoid nesting strtok.
12022
f6528abd
JK
120232010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12024
12025 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12026 (CDEPS): New.
12027 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12028 -Wl,--dynamic-list.
12029 * configure: Regenerate.
12030 * proc-service.list: New.
12031
ca2a87a0
JK
120322010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12033
12034 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12035 New comment.
12036
363a6e9f
OS
120372010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12038
12039 * gdbreplay.c (remote_open): Check error return from socket() call by
12040 its equality to -1 not by it being negative.
12041 * remote-utils.c (remote_open): Likewise.
12042
d23b6cb1
PA
120432010-05-23 Pedro Alves <pedro@codesourcery.com>
12044
12045 * config.h: Regenerate.
12046
28d3cf85
MK
120472010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12048
12049 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12050 doesn't provide PTRACE_GET_THREAD_AREA.
12051
fea36a59
MK
120522010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12053
12054 * linux-m68k-low.c: Include <asm/ptrace.h>
12055 (ps_get_thread_area): Implement.
12056
24b066ba
DE
120572010-05-03 Doug Evans <dje@google.com>
12058
12059 * event-loop.c (struct callback_event): New struct.
12060 (callback_list): New global.
12061 (append_callback_event, delete_callback_event): New functions.
12062 (process_callback): New function.
12063 (start_event_loop): Call it.
12064 * remote-utils.c (NOT_SCHEDULED): Define.
12065 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12066 moved out of readchar.
12067 (readchar): Rewrite. Call reschedule before returning.
12068 (reset_readchar): New function.
12069 (remote_close): Call it.
12070 (process_remaining, reschedule): New functions.
12071 * server.h (callback_handler_func): New typedef.
12072 (append_callback_event, delete_callback_event): Declare.
12073
9836d6ea
PA
120742010-05-03 Pedro Alves <pedro@codesourcery.com>
12075
12076 * proc-service.c (ps_pglobal_lookup): Use
12077 thread_db_look_up_one_symbol.
12078 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12079 parameter. Use it instead of all_symbols_looked_up.
12080 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12081 field.
12082 (all_symbols_looked_up): Don't declare.
12083 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12084 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12085 field.
12086 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12087 Set all_symbols_looked_up here.
12088 (thread_db_look_up_one_symbol): New.
12089 (thread_db_get_tls_address): Adjust.
12090 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12091 thread_db object on the heap, and tentatively set it in the
12092 process structure.
12093 (thread_db_init): Don't set all_symbols_looked_up here.
12094 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12095
7984d532
PA
120962010-05-03 Pedro Alves <pedro@codesourcery.com>
12097
12098 * linux-low.c (linux_kill, linux_detach): Adjust.
12099 (status_pending_p_callback): Remove redundant statement. Check
12100 for !TARGET_WAITIKIND_IGNORE, instead of
12101 TARGET_WAITKIND_STOPPED.
12102 (handle_tracepoints): Make sure LWP is locked. Adjust.
12103 (linux_wait_for_event_1): Adjust.
12104 (linux_cancel_breakpoints): New.
12105 (unsuspend_one_lwp): New.
12106 (unsuspend_all_lwps): New.
12107 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12108 (send_sigstop_callback): Change return type to int, add new
12109 `except' parameter and handle it.
12110 (suspend_and_send_sigstop_callback): New.
12111 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12112 pass them down. If SUSPEND, also increment the lwp's suspend
12113 count.
12114 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12115 (need_step_over_p): Don't consider suspended LWPs.
12116 (start_step_over): Adjust.
12117 (proceed_one_lwp): Change return type to int, add new `except'
12118 parameter and handle it.
12119 (unsuspend_and_proceed_one_lwp): New.
12120 (proceed_all_lwps): Use find_inferior instead of
12121 for_each_inferior.
12122 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12123 also decrement the suspend count of LWPs. Pass `except' down,
12124 instead of hacking its suspend count.
12125 (linux_pause_all): Add `freeze' parameter. Adjust.
12126 (linux_unpause_all): New.
12127 (linux_target_ops): Install linux_unpause_all.
12128 * server.c (handle_status): Adjust.
12129 * target.h (struct target_ops): New fields `unpause_all' and
12130 `cancel_breakpoints'. Add new parameter to `pause_all'.
12131 (pause_all): Add new `freeze' parameter.
12132 (unpause_all): New.
12133 (cancel_breakpoints): New.
12134 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12135 cancel breakpoints.
12136 (cmd_qtstart): Pause threads.
12137 (stop_tracing): Pause threads, and cancel breakpoints.
12138 * win32-low.c (win32_target_ops): Adjust.
12139
e471f25b
PA
121402010-05-03 Pedro Alves <pedro@codesourcery.com>
12141
12142 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12143 the inferior right away from here...
12144 (linux_wait_1): ... to here, and adjust to check the thread's
12145 last_resume_kind instead of the lwp's step or stop_expected flags.
12146
1915ef4f
PA
121472010-05-02 Pedro Alves <pedro@codesourcery.com>
12148
12149 * README: Use consistent `GDB' and `GDBserver' spellings.
12150
f9e39928
PA
121512010-05-02 Pedro Alves <pedro@codesourcery.com>
12152
12153 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12154 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12155 (linux_detach_one_lwp): Assume the lwp is stopped.
12156 (any_thread_of): Delete.
12157 (linux_detach): Stop all lwps here. Don't blindly delete all
12158 breakpoints.
12159 (delete_lwp_callback): New.
12160 (linux_mourn): Delete all lwps of the process that is gone.
12161 (linux_wait_1): Don't delete the last lwp of the process here.
12162 * mem-break.h (mark_breakpoints_out): Declare.
12163 * mem-break.c (mark_breakpoints_out): New.
12164 (free_all_breakpoints): Use it.
12165 * server.c (handle_target_event): If the process is gone, mark
12166 breakpoints out.
12167 * thread-db.c (struct thread_db) <create_bp>: New field.
12168 (thread_db_enable_reporting): Fix prototype. Store a thread event
12169 breakpoint reference in the thread_db struct.
12170 (thread_db_load_search): Clear the thread_db object.
12171 (try_thread_db_load_1): Ditto.
12172 (switch_to_process): New.
12173 (disable_thread_event_reporting): Use it.
12174 (remove_thread_event_breakpoints): New.
12175 (thread_db_detach, thread_db_mourn): Use it.
12176
1e7fc18c
PA
121772010-05-01 Pedro Alves <pedro@codesourcery.com>
12178
12179 * linux-low.c (linux_enable_event_reporting): New.
12180 (linux_wait_for_event_1, handle_extended_wait): Use it.
12181
02fc4de7
PA
121822010-04-30 Pedro Alves <pedro@codesourcery.com>
12183
12184 * linux-low.c (linux_kill_one_lwp, linux_kill)
12185 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12186 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12187 SIGSTOP even if the LWP is stopped.
12188 (send_sigstop_callback): New.
12189 (stop_all_lwps): Use send_sigstop_callback instead.
12190 (linux_resume_one_thread): Adjust.
12191 (proceed_one_lwp): Still proceed an LWP that the client has
12192 requested to stop, if we haven't reported it as stopped yet. Make
12193 sure that LWPs the client want stopped, have a pending SIGSTOP.
12194
bc3b5632
DE
121952010-04-26 Doug Evans <dje@google.com>
12196
ae1ada35
DE
12197 * server.c (handle_general_set): Make static.
12198
bc3b5632
DE
12199 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12200 Print received char after testing for error/eof instead of before.
12201 (input_interrupt): Tweak comment.
12202
65730243
DE
122032010-04-23 Doug Evans <dje@google.com>
12204
12205 * server.c (start_inferior): Print inferior argv if --debug.
12206
a8ae7dc0
AR
122072010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12208
12209 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12210 * nto-x86-low.c: Include server.h
12211
1c07cc19
PM
122122010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12213
12214 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12215 be consistent with other sources of this directory.
12216 (init_registers_amd64): Correct name of source file of this function
12217 in the comment.
12218
e0a61e09
PM
122192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12220
12221 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12222 64-bit executables.
12223
54709339
PM
122242010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12225
12226 * win32-i386-low.c: Add 64-bit support.
12227 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12228 (init_registers_amd64): Declare.
12229 (mappings): Add 64-bit version of array.
12230 (init_windows_x86): New function.
12231 (the_low_target): Change init_arch field to init_windows_x86.
12232
e8f0053d
PM
122332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12234
12235 * win32-low.c: Adapt to support also 64-bit architecture.
12236 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12237 (get_image_name): Use SIZE_T type for local variable `done'.
12238 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12239 (toolhelp_get_dll_name): Idem.
12240 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12241 Use uintptr_t typecast to avoid warning.
12242 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12243 (handle_exception): Use phex_nz to avoid warning.
12244 (win32_wait): Remove unused local variable `process'.
12245
c481e77e
PM
122462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12247
12248 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12249 `amd64-avx.o'.
12250
12ea4b69
PM
122512010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12252
12253 * configure.ac: Use `ws2_32' library for srv_mingw.
12254 * configure: Regenerate.
12255 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12256 * remote-utils.c: Likewise.
12257
f6d1620c
L
122582010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12259
12260 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12261 if __x86_64__ is defined.
12262
8e642873
PM
122632010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12264
12265 * configure: Regenerate.
12266
711e434b
PM
122672010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12268
12269 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12270 * target.h (target_ops): New get_tib_address field.
12271 * win32-low.h (win32_thread_info): Add thread_local_base field.
12272 * win32-low.c (child_add_thread): Add tlb argument.
12273 Set thread_local_base field to TLB.
12274 (get_child_debug_event): Adapt to child_add_thread change.
12275 (win32_get_tib_address): New function.
12276 (win32_target_ops): Set get_tib_address field to
12277 win32_get_tib_address.
12278 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12279
505106cd
PA
122802010-04-12 Pedro Alves <pedro@codesourcery.com>
12281
505106cd
PA
12282 * linux-low.c (linux_mourn): Also remove the process.
12283 * server.c (handle_target_event): Don't remove the process here.
12284 * nto-low.c (nto_mourn): New.
12285 (nto_target_ops): Install it.
12286 * spu-low.c (spu_mourn): New.
12287 (spu_target_ops): Install it.
12288 * win32-low.c (win32_mourn): New.
12289 (win32_target_ops): Install it.
12290
e8470a06
PA
122912010-04-12 Pedro Alves <pedro@codesourcery.com>
12292
12293 * server.h (buffer_xml_printf): Remove redundant `;'.
12294
45ba0d02
PA
122952010-04-12 Pedro Alves <pedro@codesourcery.com>
12296
12297 * regcache.c (set_register_cache): Invalidate regcaches before
12298 changing the register cache layout.
12299 (regcache_invalidate_one): Allow a NULL regcache.
12300 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12301 regcaches before changing the register cache layout or the target
12302 regsets.
12303
59e04013
L
123042010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12305
12306 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12307 variable warning on Linux/x86-64.
12308
8336d594
PA
123092010-04-11 Pedro Alves <pedro@codesourcery.com>
12310
12311 GDBserver disconnected tracing support.
12312
12313 * linux-low.c (linux_remove_process): Delete.
12314 (add_lwp): Don't set last_resume_kind here.
12315 (linux_kill): Use `mourn'.
12316 (linux_detach): Use `thread_db_detach', and `mourn'.
12317 (linux_mourn): New.
12318 (linux_attach_lwp_1): Adjust comment.
12319 (linux_attach): last_resume_kind moved the thread_info; adjust.
12320 (status_pending_p_callback): Adjust.
12321 (linux_wait_for_event_1): Adjust.
12322 (count_events_callback, select_singlestep_lwp_callback)
12323 (select_event_lwp_callback, cancel_breakpoints_callback)
12324 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12325 (proceed_one_lwp): Adjust.
12326 (linux_async): Add debug output.
12327 (linux_thread_stopped): New.
12328 (linux_pause_all): New.
12329 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12330 linux_pause_all.
12331 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12332 (thread_db_free): Delete declaration.
12333 (thread_db_detach, thread_db_mourn): Declare.
12334 * thread-db.c (thread_db_init): Use thread_db_mourn.
12335 (thread_db_free): Delete, split in two.
12336 (disable_thread_event_reporting): New.
12337 (thread_db_detach): New.
12338 (thread_db_mourn): New.
12339
12340 * server.h (struct thread_info) <last_resume_kind>: New field.
12341 <attached>: Add comment.
12342 <gdb_detached>: New field.
12343 (handler_func): Change return type to int.
12344 (handle_serial_event, handle_target_event): Ditto.
12345 (gdb_connected): Declare.
12346 (tracing): Delete.
12347 (disconnected_tracing): Declare.
12348 (stop_tracing): Declare.
12349
12350 * server.c (handle_query) <qSupported>: Report support for
12351 disconnected tracing.
12352 (queue_stop_reply_callback): Account for running threads.
12353 (gdb_wants_thread_stopped): New.
12354 (gdb_wants_all_threads_stopped): New.
12355 (gdb_reattached_process): New.
12356 (handle_status): Clear the `gdb_detached' flag of all processes.
12357 In all-stop, stop all threads.
12358 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12359 (process_serial_event): If the remote connection breaks, or if an
12360 exit was forced with "monitor exit", force an event loop exit.
12361 Handle disconnected tracing on detach.
12362 (handle_serial_event): Adjust.
12363 (handle_target_event): If GDB isn't connected, forward events back
12364 to the inferior, unless the last process exited, in which case,
12365 exit gdbserver. Adjust interface.
12366
12367 * remote-utils.c (remote_open): Don't block in accept. Instead
12368 register an event loop source on the listen socket file
12369 descriptor. Refactor bits into ...
12370 (listen_desc): ... this new global.
12371 (gdb_connected): ... this new function.
12372 (enable_async_notification): ... this new function.
12373 (handle_accept_event): ... this new function.
12374 (remote_close): Clear remote_desc.
12375
12376 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12377
12378 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12379 New fields.
12380 (mourn_inferior): Define.
12381 (target_process_qsupported): Avoid the dangling else problem.
12382 (thread_stopped): Define.
12383 (pause_all): Define.
12384 (target_waitstatus_to_string): Declare.
12385 * target.c (target_waitstatus_to_string): New.
12386
12387 * tracepoint.c (tracing): Make extern.
12388 (disconnected_tracing): New.
12389 (stop_tracing): Make extern. Handle tracing stops due to GDB
12390 disconnecting.
12391 (cmd_qtdisconnected): New.
12392 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12393 (handle_tracepoint_general_set): Handle QTDisconnected.
12394
12395 * event-loop.c (event_handler_func): Change return type to int.
12396 (process_event): Bail out if the event handler wants the event
12397 loop to stop.
12398 (handle_file_event): Ditto.
12399 (start_event_loop): Bail out if the event handler wants the event
12400 loop to stop.
12401
12402 * nto-low.c (nto_target_ops): Adjust.
12403 * spu-low.c (spu_wait): Don't remove the process here.
12404 (spu_target_ops): Adjust.
12405 * win32-low.c (win32_wait): Don't remove the process here.
12406 (win32_target_ops): Adjust.
12407
5d267c4c
PA
124082010-04-11 Pedro Alves <pedro@codesourcery.com>
12409
12410 * regcache.c (realloc_register_cache): Invalidate inferior's
12411 regcache before recreating it.
12412
623ccd72
PA
124132010-04-09 Pedro Alves <pedro@codesourcery.com>
12414
12415 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12416
219f2f23
PA
124172010-04-09 Stan Shebs <stan@codesourcery.com>
12418 Pedro Alves <pedro@codesourcery.com>
12419
12420 * server.h (LONGEST): New.
12421 (struct thread_info) <while_stepping>: New field.
12422 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12423 Declare.
12424 (initialize_tracepoint, handle_tracepoint_general_set)
12425 (handle_tracepoint_query, tracepoint_finished_step)
12426 (tracepoint_was_hit, release_while_stepping_state_list):
12427 (current_traceframe): Declare.
12428 * server.c (handle_general_set): Handle tracepoint packets.
12429 (read_memory): New.
12430 (write_memory): New.
12431 (handle_search_memory_1): Use read_memory.
12432 (handle_query): Report support for conditional tracepoints, trace
12433 state variables, and tracepoint sources. Handle tracepoint
12434 queries.
12435 (main): Initialize the tracepoints module.
12436 (process_serial_event): Handle traceframe reads/writes.
12437
12438 * linux-low.c (handle_tracepoints): New.
12439 (linux_wait_1): Call it.
12440 (linux_resume_one_lwp): Handle while-stepping.
12441 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12442 (linux_target_ops): Install them.
12443 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12444 New field.
12445 * linux-x86-low.c (x86_supports_tracepoints): New.
12446 (the_low_target). Install it.
12447
12448 * mem-break.h (delete_breakpoint): Declare.
12449 * mem-break.c (delete_breakpoint): Make external.
12450
12451 * target.h (struct target_ops): Add `supports_tracepoints',
12452 `read_pc', and `write_pc' fields.
12453 (target_supports_tracepoints): Define.
12454 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12455 (phex_nz): New.
12456
12457 * regcache.h (struct regcache) <registers_owned>: New field.
12458 (init_register_cache, regcache_cpy): Declare.
12459 (regcache_read_pc, regcache_write_pc): Declare.
12460 (register_cache_size): Declare.
12461 (supply_regblock): Declare.
12462 * regcache.c (init_register_cache): New.
12463 (new_register_cache): Use it.
12464 (regcache_cpy): New.
12465 (register_cache_size): New.
12466 (supply_regblock): New.
12467 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12468
219f2f23
PA
12469 * tracepoint.c: New.
12470
12471 * Makefile.in (OBS): Add tracepoint.o.
12472 (tracepoint.o): New rule.
12473
3a13a53b
L
124742010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12475
12476 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12477 (i386-mmx.o): New.
12478 (i386-mmx.c): Likewise.
12479 (i386-mmx-linux.o): Likewise.
12480 (i386-mmx-linux.c): Likewise.
12481
12482 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12483 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12484 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12485 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12486
12487 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12488 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12489 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12490
1570b33e
L
124912010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12492
12493 * Makefile.in (clean): Updated.
12494 (i386-avx.o): New.
12495 (i386-avx.c): Likewise.
12496 (i386-avx-linux.o): Likewise.
12497 (i386-avx-linux.c): Likewise.
12498 (amd64-avx.o): Likewise.
12499 (amd64-avx.c): Likewise.
12500 (amd64-avx-linux.o): Likewise.
12501 (amd64-avx-linux.c): Likewise.
12502
12503 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12504 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12505 (srv_amd64_regobj): Add amd64-avx.o.
12506 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12507 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12508 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12509 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12510 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12511 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12512 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12513
12514 * i387-fp.c: Include "i386-xstate.h".
12515 (i387_xsave): New.
12516 (i387_cache_to_xsave): Likewise.
12517 (i387_xsave_to_cache): Likewise.
12518 (x86_xcr0): Likewise.
12519
12520 * i387-fp.h (i387_cache_to_xsave): Likewise.
12521 (i387_xsave_to_cache): Likewise.
12522 (x86_xcr0): Likewise.
12523
12524 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12525 * linux-crisv32-low.c (target_regsets): Likewise.
12526 * linux-m68k-low.c (target_regsets): Likewise.
12527 * linux-mips-low.c (target_regsets): Likewise.
12528 * linux-ppc-low.c (target_regsets): Likewise.
12529 * linux-s390-low.c (target_regsets): Likewise.
12530 * linux-sh-low.c (target_regsets): Likewise.
12531 * linux-sparc-low.c (target_regsets): Likewise.
12532 * linux-xtensa-low.c (target_regsets): Likewise.
12533
12534 * linux-low.c: Include <sys/uio.h>.
12535 (regsets_fetch_inferior_registers): Support nt_type.
12536 (regsets_store_inferior_registers): Likewise.
12537 (linux_process_qsupported): New.
12538 (linux_target_ops): Add linux_process_qsupported.
12539
12540 * linux-low.h (regset_info): Add nt_type.
12541 (linux_target_ops): Add process_qsupported.
12542
12543 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12544 and <sys/uio.h>.
12545 (init_registers_i386_avx_linux): New.
12546 (init_registers_amd64_avx_linux): Likewise.
12547 (xmltarget_i386_linux_no_xml): Likewise.
12548 (xmltarget_amd64_linux_no_xml): Likewise.
12549 (PTRACE_GETREGSET): Likewise.
12550 (PTRACE_SETREGSET): Likewise.
12551 (x86_fill_xstateregset): Likewise.
12552 (x86_store_xstateregset): Likewise.
12553 (use_xml): Likewise.
12554 (x86_linux_update_xmltarget): Likewise.
12555 (x86_linux_process_qsupported): Likewise.
12556 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12557 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12558 init_registers_i386_linux here. Call
12559 x86_linux_update_xmltarget.
12560 (the_low_target): Add x86_linux_process_qsupported.
12561
12562 * server.c (handle_query): Call target_process_qsupported.
12563
12564 * target.h (target_ops): Add process_qsupported.
12565 (target_process_qsupported): New.
12566
fc7238bb
PA
125672010-04-03 Pedro Alves <pedro@codesourcery.com>
12568
12569 * inferiors.c (add_thread): Set last_status kind to
12570 TARGET_WAITKIND_IGNORE.
12571 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12572 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12573 (linux_wait_1): Move `thread' local definition to block that uses
12574 it. Don't NULL initialize `event_child'.
12575 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12576 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12577 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12578
bdabb078
PA
125792010-04-01 Pedro Alves <pedro@codesourcery.com>
12580
12581 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12582 an extended waitstatus, or by a watchpoint.
12583 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12584 thread was stepping or has been stopped by a watchpoint.
12585
d3bbe7a0
PA
125862010-04-01 Pedro Alves <pedro@codesourcery.com>
12587
12588 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12589 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12590 of another, then delete the previous, and validate all
12591 breakpoints.
12592 (validate_inserted_breakpoint): New.
12593 (delete_disabled_breakpoints): New.
12594 (validate_breakpoints): New.
12595 (check_mem_read): Validate breakpoints before trusting their
12596 shadow. Delete disabled breakpoints.
12597 (check_mem_write): Validate breakpoints before trusting they
12598 should be inserted. Delete disabled breakpoints.
12599 * mem-break.h (validate_breakpoints):
12600 * server.c (handle_query): Validate breakpoints when we see a
12601 qSymbol query.
12602
8b07ae33
PA
126032010-04-01 Pedro Alves <pedro@codesourcery.com>
12604
12605 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12606 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12607 if we could tell there's a GDB breakpoint at stop_pc.
12608 (need_step_over_p): Don't do a step over if we find a GDB
12609 breakpoint at the resume PC.
12610
12611 * mem-break.c (struct raw_breakpoint): New.
12612 (enum bkpt_type): New type `gdb_breakpoint'.
12613 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12614 fields. New field `raw'.
12615 (find_raw_breakpoint_at): New.
12616 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12617 breakpoint instead.
12618 (set_breakpoint_at): Adjust.
12619 (delete_raw_breakpoint): New.
12620 (release_breakpoint): New.
12621 (delete_breakpoint): Rename to...
12622 (delete_breakpoint_1): ... this. Add proc parameter. Use
12623 release_breakpoint. Return ENOENT.
12624 (delete_breakpoint): Reimplement.
12625 (find_breakpoint_at): Delete.
12626 (find_gdb_breakpoint_at): New.
12627 (delete_breakpoint_at): Delete.
12628 (set_gdb_breakpoint_at): New.
12629 (delete_gdb_breakpoint_at): New.
12630 (gdb_breakpoint_here): New.
12631 (set_reinsert_breakpoint): Use release_breakpoint.
12632 (uninsert_breakpoint): Rename to ...
12633 (uninsert_raw_breakpoint): ... this.
12634 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12635 (reinsert_raw_breakpoint): Change parameter type to
12636 raw_breakpoint.
12637 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12638 instead.
12639 (check_breakpoints): Adjust. Use release_breakpoint.
12640 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12641 (breakpoint_inserted_here): Ditto.
12642 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12643 Don't trust the breakpoint's shadow if it is not inserted.
12644 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12645 (delete_all_breakpoints): Adjust.
12646 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12647 use delete_breakpoint_1.
12648
12649 * mem-break.h (breakpoints_supported): Delete declaration.
12650 (set_gdb_breakpoint_at): Declare.
12651 (gdb_breakpoint_here): Declare.
12652 (delete_breakpoint_at): Delete.
12653 (delete_gdb_breakpoint_at): Declare.
12654
12655 * server.h (struct raw_breakpoint): Forward declare.
12656 (struct process_info): New field `raw_breakpoints'.
12657
12658 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12659 breakpoints.
12660
6bf5e0ba
PA
126612010-03-24 Pedro Alves <pedro@codesourcery.com>
12662
12663 * linux-low.c (status_pending_p_callback): Fix comment.
12664 (linux_wait_for_event_1): Move most of the internal breakpoint
12665 handling from here...
12666 (linux_wait_1): ... to here.
12667 (count_events_callback): New.
12668 (select_singlestep_lwp_callback): New.
12669 (select_event_lwp_callback): New.
12670 (cancel_breakpoints_callback): New.
12671 (select_event_lwp): New.
12672 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12673 priority to all LWPs that have had events that should be reported
12674 to the client. Cancel breakpoints when about to reporting the
12675 event to the client, not while stopping lwps. No longer cancel
12676 finished single-steps here.
12677 (cancel_finished_single_step): Delete.
12678 (cancel_finished_single_steps): Delete.
12679
414a389f
PA
126802010-03-24 Pedro Alves <pedro@codesourcery.com>
12681
12682 * mem-break.c (enum bkpt_type): New.
12683 (struct breakpoint): New field `type'.
12684 (set_breakpoint_at): Change return type to struct breakpoint
12685 pointer. Set type to `other_breakpoint' by default.
12686 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12687 in the breakpoint list.
12688 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12689 (reinsert_breakpoint): Rename to ...
12690 (reinsert_raw_breakpoint): ... this.
12691 (reinsert_breakpoints_at): Adjust.
12692 * mem-break.h (struct breakpoint): Declare.
12693 (set_breakpoint_at): Change return type to struct breakpoint
12694 pointer.
12695
2280c721
PA
126962010-03-24 Pedro Alves <pedro@codesourcery.com>
12697
12698 * server.c (handle_query): Assign, not compare.
12699
d50171e4
PA
127002010-03-24 Pedro Alves <pedro@codesourcery.com>
12701
12702 Teach linux gdbserver to step-over-breakpoints.
12703
12704 * linux-low.c (can_hardware_single_step): New.
12705 (supports_breakpoints): New.
12706 (handle_extended_wait): If stopping threads, read the stop pc of
12707 the new cloned LWP.
12708 (get_pc): New.
12709 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12710 low target doesn't support retrieving the PC.
12711 (add_lwp): Set last_resume_kind to resume_continue.
12712 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12713 (linux_attach): Don't clear stop_expected. Set the lwp's
12714 last_resume_kind to resume_stop.
12715 (linux_detach_one_lwp): Don't check for removed breakpoints.
12716 (check_removed_breakpoint): Delete.
12717 (status_pending_p): Rename to ...
12718 (status_pending_p_callback): ... this. Don't check for removed
12719 breakpoints. Don't consider threads that are stopped from GDB's
12720 perspective.
12721 (linux_wait_for_lwp): Always read the stop_pc here.
12722 (cancel_breakpoint): New.
12723 (step_over_bkpt): New global.
12724 (linux_wait_for_event_1): Implement stepping over breakpoints.
12725 (gdb_wants_lwp_stopped): New.
12726 (gdb_wants_all_stopped): New.
12727 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12728 single-step traps here. Store the thread's last reported target
12729 wait status.
12730 (send_sigstop): Don't clear stop_expected. Always set it,
12731 instead.
12732 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12733 (cancel_finished_single_step): New.
12734 (cancel_finished_single_steps): New.
12735 (wait_for_sigstop): Don't cancel finished single-step traps here.
12736 (linux_resume_one_lwp): Don't check for removed breakpoints.
12737 Don't set `step' on non-hardware step archs.
12738 (linux_set_resume_request): Ignore resume_stop requests if already
12739 stopping or stopped. Set the lwp's last_resume_kind.
12740 (resume_status_pending_p): Don't check for removed breakpoints.
12741 (need_step_over_p): New.
12742 (start_step_over): New.
12743 (finish_step_over): New.
12744 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12745 requests. Clear the thread's last reported target waitstatus.
12746 Don't use the `suspended' flag. Don't consider pending breakpoints.
12747 (linux_resume): Start a step-over if necessary.
12748 (proceed_one_lwp): New.
12749 (proceed_all_lwps): New.
12750 (unstop_all_lwps): New.
12751 * linux-low.h (struct lwp_info): Rewrite comment for the
12752 `suspended' flag. Add the `stop_pc' field. Delete the
12753 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12754 Add `'last_resume_kind' and `need_step_over' fields.
12755 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12756 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12757 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12758 (set_raw_breakpoint_at): New.
12759 (set_breakpoint_at): Rewrite to use it.
12760 (reinsert_breakpoint_handler): Delete.
12761 (set_reinsert_breakpoint): New.
12762 (reinsert_breakpoint_by_bp): Delete.
12763 (delete_reinsert_breakpoints): New.
12764 (uninsert_breakpoint): Rewrite.
12765 (uninsert_breakpoints_at): New.
12766 (reinsert_breakpoint): Rewrite.
12767 (reinsert_breakpoints_at): New.
12768 (check_breakpoints): Rewrite.
12769 (breakpoint_here): New.
12770 (breakpoint_inserted_here): New.
12771 (check_mem_read): Adjust.
12772 * mem-break.h (breakpoints_supported, breakpoint_here)
12773 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12774 (reinsert_breakpoint_by_bp): Delete declaration.
12775 (delete_reinsert_breakpoints): Declare.
12776 (reinsert_breakpoint): Delete declaration.
12777 (reinsert_breakpoints_at): Declare.
12778 (uninsert_breakpoint): Delete declaration.
12779 (uninsert_breakpoints_at): Declare.
12780 (check_breakpoints): Adjust prototype.
12781 * server.h: Adjust include order.
12782 (struct thread_info): Declare here. Add a `last_status' field.
12783
30ba68cb
MS
127842010-03-23 Michael Snyder <msnyder@vmware.com>
12785
12786 * server.c (crc32): New function.
12787 (handle_query): Add handling for 'qCRC:' request.
12788
b9a881c2
PA
127892010-03-23 Pedro Alves <pedro@codesourcery.com>
12790
12791 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12792 lwp had been stopped by a watchpoint.
12793
e92d13d5
PA
127942010-03-16 Pedro Alves <pedro@codesourcery.com>
12795
12796 * server.h (internal_error): Declare.
12797 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12798 * utils.c (internal_error): New function.
12799
64daa791
AS
128002010-03-15 Andreas Schwab <schwab@redhat.com>
12801
12802 * configure.srv: Fix typo setting srv_regobj.
12803
f52cd8cd
PA
128042010-03-15 Pedro Alves <pedro@codesourcery.com>
12805
12806 * linux-low.c (fetch_register): Avoid passing a non string literal
12807 format to `error'.
12808 (usr_store_inferior_registers): Ditto.
12809
93ae6fdc
PA
128102010-03-14 Pedro Alves <pedro@codesourcery.com>
12811
12812 * linux-low.c (linux_write_memory): Bail out early if peeking
12813 memory failed.
12814
c3adc08c
PA
128152010-03-14 Pedro Alves <pedro@codesourcery.com>
12816
12817 * linux-low.h (struct lwp_info): New fields
12818 `stopped_by_watchpoint' and `stopped_data_address'.
12819 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12820 here, and cache them in the lwp object.
12821 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12822 directly.
12823 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12824 field.
12825 (linux_stopped_by_watchpoint): Rewrite.
12826 (linux_stopped_data_address): Rewrite.
12827
bce522a2
PA
128282010-03-06 Simo Melenius <simo.melenius@iki.fi>
12829
12830 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12831 switching the current inferior, not before.
12832
90884b2b
L
128332010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12834
12835 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12836 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12837 i386-linux.c and amd64-linux.c.
12838 (reg-i386.o): Removed.
12839 (reg-i386.c): Likewise.
12840 (reg-i386-linux.o): Likewise.
12841 (reg-i386-linux.c): Likewise.
12842 (reg-x86-64.o): Likewise.
12843 (reg-x86-64.c): Likewise.
12844 (reg-x86-64-linux.o): Likewise.
12845 (reg-x86-64-linux.c): Likewise.
12846 (i386.o): New.
12847 (i386.c): Likewise.
12848 (i386-linux.o): Likewise.
12849 (i386-linux.c): Likewise.
12850 (amd64.o): Likewise.
12851 (amd64.c): Likewise.
12852 (amd64-linux.o): Likewise.
12853 (amd64-linux.c): Likewise.
12854
12855 * configure.srv (srv_i386_regobj): New.
12856 (srv_i386_linux_regobj): Likewise.
12857 (srv_amd64_regobj): Likewise.
12858 (srv_amd64_linux_regobj): Likewise.
12859 (srv_i386_32bit_xmlfiles): Likewise.
12860 (srv_i386_64bit_xmlfiles): Likewise.
12861 (srv_i386_xmlfiles): Likewise.
12862 (srv_amd64_xmlfiles): Likewise.
12863 (srv_i386_linux_xmlfiles): Likewise.
12864 (srv_amd64_linux_xmlfiles): Likewise.
12865 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12866 srv_xmlfiles to $srv_i386_xmlfiles.
12867 (i[34567]86-*-mingw32ce*): Likewise.
12868 (i[34567]86-*-mingw*): Likewise.
12869 (i[34567]86-*-nto*): Likewise.
12870 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12871 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12872 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12873 (x86_64-*-linux*): Likewise.
12874
12875 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12876 (init_registers_amd64_linux): New.
12877 (x86_arch_setup): Replace init_registers_x86_64_linux with
12878 init_registers_amd64_linux.
12879
193f13e6
MK
128802010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12881
12882 * configure.ac: Check for libdl. If it is not available link against
12883 static libthread_db.
12884 * configure: Regenerate.
12885
85d721b8
PA
128862010-02-22 Pedro Alves <pedro@codesourcery.com>
12887
12888 PR9605
12889
12890 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12891 handing a read watchpoint.
12892 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12893
6076632b
DE
128942010-02-12 Doug Evans <dje@google.com>
12895
12896 * linux-low.c (linux_supports_tracefork_flag): Document.
12897 (linux_look_up_symbols): Add comment.
12898
3327ccf7
L
128992010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12900
12901 * regcache.c (supply_register): Clear regcache if buf is NULL.
12902
0718675c 129032010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12904 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12905
12906 * inferiors.c (find_inferior): Add function documentation.
12907 (unloaded_dll): Handle the case where the unloaded dll has not
12908 been previously registered in the dll list.
12909
177321bd
DJ
129102010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12911
12912 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12913 (thumb2_breakpoint): New.
12914 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12915
2b009048
DJ
129162010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12917
12918 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12919 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12920 breakpoints.
12921
3be029c7
PA
129222010-01-21 Pedro Alves <pedro@codesourcery.com>
12923
12924 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12925
18f5de3b
JK
129262010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12927
12928 * linux-s390-low.c (s390_collect_ptrace_register)
12929 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12930
3743bb4f
DE
129312010-01-21 Doug Evans <dje@google.com>
12932
14ce3065
DE
12933 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12934 (PTRACE_ARG4_TYPE): New macro.
12935 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12936 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12937 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12938 (usr_store_inferior_registers): Ditto.
12939 (linux_read_memory, linux_write_memory): Ditto.
12940 (linux_test_for_tracefork): Ditto.
12941
3743bb4f
DE
12942 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12943 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12944
8b315be5
PA
129452010-01-21 Pedro Alves <pedro@codesourcery.com>
12946
12947 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12948 target.
12949
85492558
PA
129502010-01-21 Pedro Alves <pedro@codesourcery.com>
12951
12952 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12953 prototype to take a regcache. Adjust.
12954
442ea881
PA
129552010-01-20 Pedro Alves <pedro@codesourcery.com>
12956
12957 * regcache.h (struct thread_info): Forward declare.
12958 (struct regcache): New.
12959 (new_register_cache): Adjust prototype.
12960 (get_thread_regcache): Declare.
12961 (free_register_cache): Adjust prototype.
12962 (registers_to_string, registers_from_string): Ditto.
12963 (supply_register, supply_register_by_name, collect_register)
12964 (collect_register_as_string, collect_register_by_name): Ditto.
12965 * regcache.c (struct inferior_regcache_data): Delete.
12966 (get_regcache): Rename to ...
12967 (get_thread_regcache): ... this. Adjust. Switch inferior before
12968 fetching registers.
12969 (regcache_invalidate_one): Adjust.
12970 (regcache_invalidate): Fix prototype.
12971 (new_register_cache): Return the new register cache.
12972 (free_register_cache): Change prototype.
12973 (realloc_register_cache): Adjust.
12974 (registers_to_string): Change prototype to take a regcache. Adjust.
12975 (registers_from_string): Ditto.
12976 (register_data): Ditto.
12977 (supply_register): Ditto.
12978 (supply_register_by_name): Ditto.
12979 (collect_register): Ditto.
12980 (collect_register_as_string): Ditto.
12981 (collect_register_by_name): Ditto.
12982 * server.c (process_serial_event): Adjust.
12983 * linux-low.h (regset_fill_func, regset_store_func): Change
12984 prototype.
12985 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12986 Change prototype.
12987 * linux-low.c (get_stop_pc): Adjust.
12988 (check_removed_breakpoint): Adjust.
12989 (linux_wait_for_event): Adjust.
12990 (linux_resume_one_lwp): Adjust.
12991 (fetch_register): Add regcache parameter. Adjust.
12992 (usr_store_inferior_registers): Ditto.
12993 (regsets_fetch_inferior_registers): Ditto.
12994 (regsets_store_inferior_registers): Ditto.
12995 (linux_fetch_registers, linux_store_registers): Ditto.
12996 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12997 regcache. Adjust.
43aaf8b6
PA
12998 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12999 Ditto.
442ea881
PA
13000 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13001 prototype to take a regcache.
13002 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13003 * remote-utils.c (convert_ascii_to_int, outreg)
13004 (prepare_resume_reply): Change prototype to take a regcache.
13005 Adjust.
13006 * target.h (struct target_ops) <fetch_registers, store_registers>:
13007 Change prototype to take a regcache.
13008 (fetch_inferior_registers, store_inferior_registers): Change
13009 prototype to take a regcache. Adjust.
13010 * proc-service.c (ps_lgetregs): Adjust.
13011 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13012 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13013 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13014 take a regcache. Adjust.
13015 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13016 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13017 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13018 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13019 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13020 (cris_cannot_fetch_register):
13021 (cris_breakpoint_at): Change prototype to take a regcache.
13022 Adjust.
13023 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13024 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13025 to take a regcache. Adjust.
13026 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13027 Adjust.
13028 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13029 take a regcache. Adjust.
13030 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13031 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13032 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13033 * linux-mips-low.c (mips_get_pc):
13034 (mips_set_pc): Change prototype to take a regcache. Adjust.
13035 (mips_reinsert_addr): Adjust.
13036 (mips_collect_register): Change prototype to take a regcache.
13037 Adjust.
13038 (mips_supply_register):
13039 (mips_collect_register_32bit, mips_supply_register_32bit)
13040 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13041 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13042 * linux-ppc-low.c (ppc_supply_ptrace_register)
13043 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13044 (parse_spufs_run): Adjust.
13045 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13046 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13047 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13048 take a regcache. Adjust.
13049 * linux-s390-low.c (s390_collect_ptrace_register)
13050 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13051 (s390_set_pc): Change prototype to take a regcache. Adjust.
13052 (s390_arch_setup): Adjust.
13053 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13054 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13055 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13056 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13057 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13058 regcache. Adjust.
13059 (sparc_breakpoint_at): Adjust.
13060 * linux-xtensa-low.c (xtensa_fill_gregset):
13061 (xtensa_store_gregset):
13062 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13063 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13064 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13065 prototype to take a regcache. Adjust.
13066 * win32-arm-low.c (arm_fetch_inferior_register)
13067 (arm_store_inferior_register): Change prototype to take a
13068 regcache. Adjust.
13069 * win32-i386-low.c (i386_fetch_inferior_register)
13070 (i386_store_inferior_register): Change prototype to take a
13071 regcache. Adjust.
13072 * win32-low.c (child_fetch_inferior_registers)
13073 (child_store_inferior_registers): Change prototype to take a
13074 regcache. Adjust.
13075 (win32_wait): Adjust.
13076 (win32_fetch_inferior_registers): Change prototype to take a
13077 regcache. Adjust.
13078 (win32_store_inferior_registers): Adjust.
13079 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13080 store_inferior_register>: Change prototype to take a regcache.
13081
60c3d7b0
DE
130822010-01-20 Doug Evans <dje@google.com>
13083
13084 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13085 #ifdef.
13086 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13087 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13088
dc146f7c
VP
130892010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13090
13091 * linux-low.c (linux_core_of_thread): New.
13092 (compare_ints, show_process, list_threads): New.
13093 (linux_qxfer_osdata): Report threads and cores.
13094 (linux_target_op): Register linux_core_of_thread.
13095 * remote-utils.c (prepare_resume_reply): Report the core.
13096 (buffer_xml_printf): Support %d specifier.
13097 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13098 New.
13099 (handle_query): Handle qXfer:threads. Announce availability
13100 thereof.
13101 * target.h (struct target_ops): New field core_of_thread.
13102
7803799a
UW
131032010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13104
13105 * Makefile.in (clean): Remove new generated files.
13106 (reg-s390.o, reg-s390.c): Remove rules.
13107 (reg-s390x.o, reg-s390x.c): Likewise.
13108 (s390-linux32.o, s390-linux32.c): Add rules.
13109 (s390-linux64.o, s390-linux64.c): Likewise.
13110 (s390x-linux64.o, s390x-linux64.c): Likewise.
13111 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13112 * linux-s390-low.c: Include <elf.h>.
13113 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13114 (init_registers_s390): Remove prototype.
13115 (init_registers_s390x): Likewise.
13116 (init_registers_s390_linux32): Add prototype.
13117 (init_registers_s390_linux64): Likewise.
13118 (init_registers_s390x_linux64): Likewise.
13119 (s390_num_regs_3264): New define.
13120 (s390_regmap_3264): New global variable.
13121 (s390_cannot_fetch_register): Remove obsolete check.
13122 (s390_cannot_store_register): Likewise.
13123 (s390_collect_ptrace_register): Handle upper/lower register halves.
13124 (s390_supply_ptrace_register): Likewise.
13125 (s390_fill_gregset): Update to register number changes.
13126 (s390_get_hwcap): New routine.
13127 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13128 Install appropriate regmap and register set.
13129
6e7ffa39
JB
131302010-01-01 Joel Brobecker <brobecker@adacore.com>
13131
13132 * server.c (gdbserver_version): Update copyright year to 2010.
13133 * gdbreplay.c (gdbreplay_version): Likewise.
13134
957f3f49
DE
131352009-12-28 Doug Evans <dje@google.com>
13136
13137 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13138 elf/external.h. Include <elf.h> instead but only if necessary.
13139
ca5c370d
PA
131402009-12-28 Pedro Alves <pedro@codesourcery.com>
13141
13142 * linux-low.c (linux_remove_process): Remove `detaching'
13143 parameter. Don't release/detach from thread_db here.
13144 (linux_kill): Release/detach from thread_db here, ...
13145 (linux_detach): ... and here, before actually detaching.
13146 (linux_wait_1): ... and here, when a process exits.
13147 * thread-db.c (any_thread_of): New.
13148 (thread_db_free): Switch the current inferior to a thread of the
13149 passed in process.
13150
4ee62156
DE
131512009-12-21 Doug Evans <dje@google.com>
13152
d90e6a88
DE
13153 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13154
c5f62d5f
DE
13155 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13156 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13157 warning ifndef __NR_tkill. Move setting of errno there too.
13158 Delete unnecessary resetting of errno after syscall.
13159 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13160
10e86dd7
DE
13161 * configure.ac: Check for dladdr.
13162 * config.in: Regenerate.
13163 * configure: Regenerate.
13164 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13165 (try_thread_db_load): Update.
13166
4ee62156
DE
13167 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13168
00f515da
DE
131692009-12-18 Doug Evans <dje@google.com>
13170
e9464885
DE
13171 * event-loop.c: Include unistd.h if it exists.
13172
07d4f67e
DE
13173 * linux-low.c (my_waitpid): Move definition away from being in
13174 between linux_tracefork_child/linux_test_for_tracefork.
13175
00f515da
DE
13176 * gdb_proc_service.h (psaddr_t): Fix type.
13177 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13178 signature to match glibc.
13179
1de1badb
DE
131802009-12-16 Doug Evans <dje@google.com>
13181
13182 * linux-low.c (linux_read_memory): Fix argument to read.
13183
aeeb81d1
PA
131842009-11-26 Pedro Alves <pedro@codesourcery.com>
13185
13186 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13187 events, don't leave current_inferior pointing at null.
13188
10357975
PA
131892009-11-26 Pedro Alves <pedro@codesourcery.com>
13190
13191 * win32-low.c (LOG): Delete.
13192 (OUTMSG): Output to stderr.
13193 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13194 on compile time LOG macro.
13195 (win32_wait): Fix debug output.
13196
cf6e3471
PA
131972009-11-26 Pedro Alves <pedro@codesourcery.com>
13198
13199 * win32-low.c (win32_add_one_solib): If the dll name is
13200 "ntdll.dll", prepend the system directory to the dll path.
13201
0c85e18e
MK
132022009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13203
13204 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13205
9ac544ce 132062009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13207 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13208
13209 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13210 * configure.ac: Check for __mcoldfire__ and set
13211 gdb_cv_m68k_is_coldfire.
13212 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13213 reg-cf.o and reg-m68k.o.
13214 * configure: Regenerated.
13215
fd7dd3e6
PA
132162009-11-16 Pedro Alves <pedro@codesourcery.com>
13217
13218 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13219 Pass it to thread_db_free.
13220 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13221 proper `detaching' argument to linux_remove_process.
13222 * linux-low.h (thread_db_free): Add `detaching' parameter.
13223 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13224 to thread_db_free.
13225 (thread_db_free): Add `detaching' parameter. Only
13226 call td_ta_clear_event if detaching from process.
13227
75aa492e
MK
132282009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13229
13230 * thread-db.c (thread_db_free): Fix typo.
13231
21e1bee4
PP
132322009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13233
13234 PR gdb/10838
13235 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13236
8838b45e
NS
132372009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13238
13239 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13240 with an i686 compiler.
13241 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13242 needed.
13243 * configure: Rebuilt.
13244
8a35fb51
SL
132452009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13246
13247 PR gdb/10783
13248
13249 * server.c (handle_search_memory_1): Correct read_addr initialization
13250 in loop for searching subsequent chunks.
13251
96f15937
PP
132522009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13253
13254 * configure.ac: New --with-libthread-db option.
13255 * thread-db.c: Allow direct dependence on libthread_db.
13256 (thread_db_free): Adjust.
13257 * config.in: Regenerate.
13258 * configure: Likewise.
889bf7c5 13259
5f7d1694
PP
132602009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13261
13262 PR gdb/10757
13263 * thread-db.c (attach_thread): New function.
13264 (maybe_attach_thread): Return success/failure.
13265 (find_new_threads_callback): Adjust.
889bf7c5
PA
13266 (thread_db_find_new_threads): Loop until no new threads.
13267
88e3b899
PA
132682009-10-13 Pedro Alves <pedro@codesourcery.com>
13269
13270 * proc-service.c (ps_lgetregs): Formatting.
13271
cdbfd419
PP
132722009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13273
13274 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13275 * configure.ac: Adjust.
13276 * linux-low.h (struct process_info_private): Move members to struct
13277 thread_db.
13278 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13279 * linux-low.c (linux_remove_process): Adjust.
13280 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13281 * server.c (handle_query): Move code ...
13282 (handle_monitor_command): ... here. New function.
13283 * target.h (struct target_ops): New member.
13284 * thread-db.c (struct thread_db): New.
13285 (libthread_db_search_path): New variable.
13286 (thread_db_create_event, thread_db_enable_reporting)
13287 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13288 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13289 (try_thread_db_load_1, dladdr_to_soname): New functions.
13290 (try_thread_db_load, thread_db_load_search): New functions.
13291 (thread_db_init): Search for libthread_db.
13292 (thread_db_free): New function.
13293 (thread_db_handle_monitor_command): Likewise.
13294 * config.in: Regenerate.
13295 * configure: Regenerate.
889bf7c5 13296
4168d2d6
UW
132972009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13298
13299 * spu-low.c (spu_kill): Wait for inferior to terminate.
13300 Call clear_inferiors.
13301 (spu_detach): Call clear_inferiors.
13302
81ecdfbb
RW
133032009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13304
13305 * aclocal.m4: Regenerate.
13306 * config.in: Likewise.
13307 * configure: Likewise.
13308
0b9ff2c0
UW
133092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13310
13311 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13312 (parse_spufs_run): New function.
13313 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13314 (ppc_breakpoint_at): Handle SPU breakpoints.
13315
efcbbd14
UW
133162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13317
13318 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13319 (SPUFS_MAGIC): Define.
13320 (spu_enumerate_spu_ids): New function.
13321 (linux_qxfer_spu): New function.
13322 (linux_target_ops): Install linux_qxfer_spu.
13323
f4d9bade
UW
133242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13325
13326 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13327 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13328 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13329 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13330 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13331 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13332 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13333 (init_registers_powerpc_cell32l): Add prototype.
13334 (init_registers_powerpc_cell64l): Likewise.
13335 (ppc_arch_setup): Detect Cell/B.E. architecture.
13336
96e946ca
RW
133372009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13338
13339 * Makefile.in (datarootdir): New variable.
13340
58d6951d
DJ
133412009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13342
13343 * linux-low.c (linux_write_memory): Update debugging output.
13344 * Makefile.in (clean): Add new descriptions.
13345 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13346 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13347 * configure.srv: Add new files for arm*-*-linux*.
13348 * linux-arm-low.c: Add new declarations.
13349 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13350 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13351 (HWCAP_VFPv3D16): New.
13352 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13353 instead of __IWMMXT__.
13354 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13355 (arm_arch_setup): New.
13356 (target_regsets): Remove #ifdef. Add VFP regset.
13357 (the_low_target): Use arm_arch_setup.
13358
12b42a12
DJ
133592009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13360
13361 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13362 the main thread again.
13363
ac8c974e
AR
133642009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13365
13366 Adding Neutrino gdbserver.
13367 * configure: Regenerated.
13368 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13369 * configure.srv (i[34567]86-*-nto*): New target.
13370 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13371 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13372 (nto_comctrl) [__QNX__]: New function.
13373 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13374
4424e0c3 133752009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13376
13377 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13378 srv_tgtobj.
13379
912cf4ba
PA
133802009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13381 Pedro Alves <pedro@codesourcery.com>
13382
13383 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13384 don't support CONTEXT_EXTENDED_REGISTERS.
13385 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13386 (the_low_target): Install them.
13387 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13388 failing with ERROR_PIPE_NOT_CONNECTED.
13389
aa5ca48f
DE
133902009-06-30 Doug Evans <dje@google.com>
13391 Pierre Muller <muller@ics.u-strasbg.fr>
13392
13393 Add h/w watchpoint support to x86-linux, win32-i386.
13394 * Makefile.in (SFILES): Add i386-low.c
13395 (i386_low_h): Define.
13396 (i386-low.o): Add dependencies.
13397 (linux-x86-low.o): Add i386-low.h dependency.
13398 (win32-i386-low.o): Ditto.
13399 * i386-low.c: New file.
13400 * i386-low.h: New file.
13401 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13402 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13403 * linux-low.c (linux_add_process): Initialize arch_private.
13404 (linux_remove_process): Free arch_private.
13405 (add_lwp): Initialize arch_private.
13406 (delete_lwp): Free arch_private.
13407 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13408 provided.
13409 * linux-low.h (process_info_private): New member arch_private.
13410 (lwp_info): New member arch_private.
13411 (linux_target_ops): New members new_process, new_thread,
13412 prepare_to_resume.
13413 (ptid_of): New macro.
13414 * linux-x86-low.c: Include stddef.h, i386-low.h.
13415 (arch_process_info): New struct.
13416 (arch_lwp_info): New struct.
13417 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13418 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13419 (i386_dr_low_get_status): New function.
13420 (x86_insert_point, x86_remove_point): New functions.
13421 (x86_stopped_by_watchpoint): New function.
13422 (x86_stopped_data_address): New function.
13423 (x86_linux_new_process, x86_linux_new_thread): New functions.
13424 (x86_linux_prepare_to_resume): New function.
13425 (the_low_target): Add entries for insert_point, remove_point,
13426 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13427 prepare_to_resume.
13428 * server.c (debug_hw_points): New global.
13429 (monitor_show_help): Document set debug-hw-points.
13430 (handle_query): Process "set debug-hw-points".
13431 * server.h (debug_hw_points): Declare.
13432 (paddress): Declare.
13433 * utils.c (NUMCELLS, CELLSIZE): New macros.
13434 (get_sell, xsnprintf, paddress): New functions.
13435 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13436 remove_point, stopped_by_watchpoint, stopped_data_address.
13437 * win32-i386-low.c: Include i386-low.h.
13438 (debug_reg_state): Replaces dr.
13439 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13440 (i386_dr_low_get_status): New function.
13441 (i386_insert_point, i386_remove_point): New functions.
13442 (i386_stopped_by_watchpoint): New function.
13443 (i386_stopped_data_address): New function.
13444 (i386_initial_stuff): Update.
13445 (get_thread_context,set_thread_context,i386_thread_added): Update.
13446 (the_low_target): Add entries for insert_point,
13447 remove_point, stopped_by_watchpoint, stopped_data_address.
13448 * win32-low.c (win32_insert_watchpoint): New function.
13449 (win32_remove_watchpoint): New function.
13450 (win32_stopped_by_watchpoint): New function.
13451 (win32_stopped_data_address): New function.
13452 (win32_target_ops): Add entries for insert_watchpoint,
13453 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13454 * win32-low.h (win32_target_ops): New members insert_point,
13455 remove_point, stopped_by_watchpoint, stopped_data_address.
13456
d993e290
PA
134572009-06-25 Pedro Alves <pedro@codesourcery.com>
13458
13459 * server.c (process_serial_event): Re-return unsupported, not
13460 error, if the type isn't recognized. Re-allow supporting only
13461 insert or remove packets. Also call require_running for
13462 breakpoints. Add missing break statement to default case. Tidy.
13463 * target.h (struct target_ops): Rename insert_watchpoint to
13464 insert_point, and remove_watchpoint to remove_point.
13465
13466 * linux-low.h (struct linux_target_ops): Likewise.
13467 * linux-low.c (linux_insert_watchpoint): Rename to ...
13468 (linux_insert_point): ... this. Adjust.
13469 (linux_remove_watchpoint): Rename to ...
13470 (linux_remove_point): ... this. Adjust.
13471 (linux_target_ops): Adjust.
13472 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13473 (cris_insert_point): ... this.
13474 (cris_remove_watchpoint): Rename to ...
13475 (cris_remove_point): ... this.
13476 (the_low_target): Adjust.
13477
0f54c268
PM
134782009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13479
13480 * server.c (handle_v_kill): Pass signal_pid to
13481 kill_inferior if multi_process is zero.
13482
c6314022
AR
134832009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13484
13485 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13486 * target.h (target_ops): Comment for *_watchpoint to make it clear
13487 the functions can get types '0' and '1'.
13488
4463ce24
AR
134892009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13490
13491 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13492 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13493 * regcache.c (get_regcache): Likewise.
13494 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13495 * win32-low.c (child_fetch_inferior_registers): Remove check for
13496 regno 0.
13497
cf8fd78b
PA
134982009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13499 Pedro Alves <pedro@codesourcery.com>
13500
13501 * target.h (struct target_ops) <supports_multi_process>: New
13502 callback.
13503 (target_supports_multi_process): New.
13504 * server.c (handle_query): Even if GDB reports support, only
13505 enable multi-process if the target also supports it. Report
13506 multi-process support only if the target backend supports it.
13507 * linux-low.c (linux_supports_multi_process): New function.
13508 (linux_target_ops): Install it as target_supports_multi_process
13509 callback.
13510
47c0c975
DE
135112009-05-24 Doug Evans <dje@google.com>
13512
e09875d4
DE
13513 Global renaming of find_thread_pid to find_thread_ptid.
13514 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13515 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13516 All callers updated.
13517
e27d73f6
DE
13518 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13519 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13520 directly.
13521
47c0c975
DE
13522 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13523 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13524 (linux_resume_one_lwp): Ditto.
13525
2acc282a
DE
135262009-05-23 Doug Evans <dje@google.com>
13527
13528 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13529 from struct inferior_list_entry * to struct lwp_info *.
13530 All callers updated.
13531
9f1036c1
DE
135322009-05-13 Doug Evans <dje@google.com>
13533
13534 * linux-x86-low.c: Don't include assert.h.
13535 (x86_siginfo_fixup): Use fatal, not assert.
13536 (x86_arch_setup): Fix comment.
13537
d0722149
DE
135382009-05-12 Doug Evans <dje@google.com>
13539
13540 Biarch support for i386/amd64 gdbserver.
13541 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13542 Add linux-x86-low.c.
13543 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13544 (linux-x86-low.o): Add.
13545 * linux-x86-64-low.c: Delete.
13546 * linux-i386-low.c: Delete.
13547 * linux-x86-low.c: New file.
13548 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13549 linux-x86-low.o.
13550 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13551 linux-x86-low.o.
13552 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13553 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13554 (linux_child_pid_to_exec_file): New function.
13555 (elf_64_header_p, elf_64_file_p): New functions.
13556 (siginfo_fixup): New function.
13557 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13558 give target a chance to convert layout.
13559 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13560 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13561
fdeb2a12
DE
135622009-05-07 Doug Evans <dje@google.com>
13563
13564 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13565 (regsets_store_inferior_registers): Ditto.
13566
a6dbe5df
PA
135672009-05-06 Pedro Alves <pedro@codesourcery.com>
13568
13569 PR server/10048
13570
13571 * linux-low.c (must_set_ptrace_flags): Delete.
13572 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13573 of the global.
13574 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13575 `lwp->must_set_ptrace_flags' instead.
ba42693b 13576 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13577 (linux_wait_1): ... not here.
13578
5091eb23
DE
135792009-04-30 Doug Evans <dje@google.com>
13580
9f767825
DE
13581 * inferiors.c (started_inferior_callback): New function.
13582 (attached_inferior_callback): New function.
13583 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13584 * server.c (print_started_pid, print_attached_pid): New functions.
13585 (detach_or_kill_for_exit): New function.
13586 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13587 * server.h (have_started_inferiors_p): Declare.
13588 (have_attached_inferiors_p): Declare.
13589
5091eb23
DE
13590 * inferiors.c (remove_process): Fix memory leak, free process.
13591 * linux-low.c (linux_remove_process): New function.
13592 (linux_kill): Call it instead of remove_process.
13593 (linux_detach, linux_wait_1): Ditto.
13594
155c8968
PA
135952009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13596
13597 * configure.srv: Add x86 Windows CE target.
13598
7fe519cb
UW
135992009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13600
13601 * inferiors.c (get_thread_process): Make global.
13602 * server.h (get_thread_process): Add prototype.
13603 * thread-db.c (find_one_thread): Use get_thread_process
13604 instead of current_process.
13605 (thread_db_get_tls_address): Do not crash if called when
13606 thread layer is not yet initialized.
13607
5472f405
UW
136082009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13609
13610 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13611 * spu-low.c (current_tid): Rename to ...
13612 (current_ptid): ... this.
13613 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13614 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13615 ptid_get_lwp (current_ptid) instead of current_tid.
13616 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13617 instead of current_tid. Use find_process_pid to verify pid
13618 argument is valid. Pass proper argument to remove_process.
13619 (spu_thread_alive): Compare current_ptid instead of current_tid.
13620 (spu_resume): Likewise.
13621
55ac2b99
PA
136222009-04-02 Pedro Alves <pedro@codesourcery.com>
13623
13624 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13625 variable.
13626
95954743
PA
136272009-04-01 Pedro Alves <pedro@codesourcery.com>
13628
13629 Implement the multiprocess extensions, and add linux multiprocess
13630 support.
13631
13632 * server.h (ULONGEST): Declare.
13633 (struct ptid, ptid_t): New.
13634 (minus_one_ptid, null_ptid): Declare.
13635 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13636 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13637 (struct inferior_list_entry): Change `id' type from unsigned from
13638 to ptid_t.
13639 (struct sym_cache, struct breakpoint, struct
13640 process_info_private): Forward declare.
13641 (struct process_info): Declare.
13642 (current_process): Declare.
13643 (all_processes): Declare.
13644 (initialize_inferiors): Declare.
13645 (add_thread): Adjust to use ptid_t.
13646 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13647 (add_process, remove_process, find_thread_pid): Declare.
13648 (find_inferior_id): Adjust to use ptid_t.
13649 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13650 (multi_process): Declare.
13651 (push_event): Adjust to use ptid_t.
13652 (read_ptid, write_ptid): Declare.
13653 (prepare_resume_reply): Adjust to use ptid_t.
13654 (clear_symbol_cache): Declare.
13655 * inferiors.c (all_processes): New.
13656 (null_ptid, minus_one_ptid): New.
13657 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13658 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13659 (add_thread): Change unsigned long to ptid. Remove gdb_id
13660 parameter. Adjust.
13661 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13662 (gdb_id_to_thread): Rename to ...
13663 (find_thread_pid): ... this. Change unsigned long to ptid.
13664 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13665 (loaded_dll, pull_pid_from_list): Adjust.
13666 (add_process, remove_process, find_process_pid)
13667 (get_thread_process, current_process, initialize_inferiors): New.
13668 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13669 (struct target_waitstatus) <related_pid>: Ditto.
13670 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13671 return type to int.
13672 (struct target_ops) <join>: Add `pid' argument.
13673 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13674 (struct target_ops) <wait>: Add `ptid' field. Change return type
13675 to ptid.
13676 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13677 (mywait): Add `ptid' argument. Change return type to ptid_t.
13678 (target_pid_to_str): Declare.
13679 * target.c (set_desired_inferior): Adjust to use ptids.
13680 (mywait): Add new `ptid' argument. Adjust.
13681 (target_pid_to_str): New.
13682 * mem-break.h (free_all_breakpoints): Declare.
13683 * mem-break.c (breakpoints): Delelete.
13684 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13685 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13686 to use per-process breakpoint list.
13687 (free_all_breakpoints): New.
13688 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13689 (symbol_cache, all_symbols_looked_up): Delete.
13690 (hexchars): New.
13691 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13692 read_ptid): New.
13693 (prepare_resume_reply): Change ptid argument's type from unsigned
13694 long to ptid_t. Adjust. Implement W;process and X;process.
13695 (free_sym_cache, clear_symbol_cache): New.
13696 (look_up_one_symbol): Adjust to per-process symbol cache. *
13697 * server.c (cont_thread, general_thread, step_thread): Change type
13698 to ptid_t.
13699 (attached): Delete.
13700 (multi_process): New.
13701 (last_ptid): Change type to ptid_t.
13702 (struct vstop_notif) <ptid>: Change type to ptid_t.
13703 (queue_stop_reply, push_event): Change `ptid' argument's type to
13704 ptid_t.
13705 (discard_queued_stop_replies): Add `pid' argument.
13706 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13707 changes. Don't reference the `attached' global.
13708 (attach_inferior): Adjust to mywait interface changes.
13709 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13710 features. Handle and report "multiprocess+". Handle
13711 "qAttached:PID".
13712 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13713 changes.
13714 (handle_v_kill): New.
13715 (handle_v_stopped): Adjust to use target_pid_to_str.
13716 (handle_v_requests): Allow multiple attaches and runs when
13717 multiprocess extensions are in effect. Handle "vKill".
13718 (myresume): Adjust to use ptids.
13719 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13720 (handle_status): Adjust to discard_queued_stop_replies interface
13721 change.
13722 (first_thread_of, kill_inferior_callback)
13723 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13724 (main): Call initialize_inferiors. Adjust to use ptids, killing
13725 and detaching from all inferiors. Handle multiprocess packet
13726 variants.
13727 * linux-low.h: Include gdb_proc_service.h.
13728 (struct process_info_private): New.
13729 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13730 <lwpid_of>: Use ptid_get_lwp.
13731 (get_lwp_thread): Adjust.
13732 (struct lwp_info): Add `dead' member.
13733 (find_lwp_pid): Declare.
13734 * linux-low.c (thread_db_active): Delete.
13735 (new_inferior): Adjust comment.
13736 (inferior_pid): Delete.
13737 (linux_add_process): New.
13738 (handle_extended_wait): Adjust.
13739 (add_lwp): Change unsigned long to ptid.
13740 (linux_create_inferior): Add process to processes table. Adjust
13741 to use ptids. Don't set new_inferior here.
13742 (linux_attach_lwp): Rename to ...
13743 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13744 it. Adjust to use ptids.
13745 (linux_attach_lwp): New.
13746 (linux_attach): Add process to processes table. Don't set
13747 new_inferior here.
13748 (struct counter): New.
13749 (second_thread_of_pid_p, last_thread_of_process_p): New.
13750 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13751 multiple processes.
13752 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13753 processes. Remove process from process table.
13754 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13755 to multiple processes.
13756 (any_thread_of): New.
13757 (linux_detach): Add `pid' argument, and handle it. Remove process
13758 from processes table.
13759 (linux_join): Add `pid' argument. Handle it.
13760 (linux_thread_alive): Change unsighed long argument to ptid_t.
13761 Consider dead lwps as not being alive.
13762 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13763 threads we're not interested in.
13764 (same_lwp, find_lwp_pid): New.
13765 (linux_wait_for_lwp): Change `pid' argument's type from int to
13766 ptid_t. Adjust.
13767 (linux_wait_for_event): Rename to ...
13768 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13769 from int to ptid_t. Adjust.
13770 (linux_wait_for_event): New.
13771 (linux_wait_1): Add `ptid' argument. Change return type to
13772 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13773 that exit from the process table.
13774 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13775 Adjust.
13776 (mark_lwp_dead): New.
13777 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13778 stopping all threads, mark its main lwp as dead.
13779 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13780 ptids.
13781 (fetch_register, usr_store_inferior_registers)
13782 (regsets_fetch_inferior_registers)
13783 (regsets_store_inferior_registers, linux_read_memory)
13784 (linux_write_memory): Inline `inferior_pid'.
13785 (linux_look_up_symbols): Adjust to use per-process
13786 `thread_db_active'.
13787 (linux_request_interrupt): Adjust to use ptids.
13788 (linux_read_auxv): Inline `inferior_pid'.
13789 (initialize_low): Don't reference thread_db_active.
13790 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13791 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13792 (ps_getpid): Return the pid of the current inferior.
13793 * thread-db.c (proc_handle, thread_agent): Delete.
13794 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13795 per-process data.
13796 (find_one_thread): Change argument type to ptid_t. Adjust to
13797 per-process data.
13798 (maybe_attach_thread): Adjust to per-process data and ptids.
13799 (thread_db_find_new_threads): Ditto.
13800 (thread_db_init): Ditto.
13801 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13802 processes table. Adjust to use ptids.
13803 (spu_kill, spu_detach): Adjust interface. Remove process from
13804 processes table.
13805 (spu_join, spu_thread_alive): Adjust interface.
13806 (spu_wait): Adjust interface. Remove process from processes
13807 table. Adjust to use ptids.
13808 * win32-low.c (current_inferior_tid): Delete.
13809 (current_inferior_ptid): New.
13810 (debug_event_ptid): New.
13811 (thread_rec): Take a ptid. Adjust.
13812 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13813 (child_delete_thread): Ditto.
13814 (do_initial_child_stuff): Add `attached' argument. Add process to
13815 processes table.
13816 (child_fetch_inferior_registers, child_store_inferior_registers):
13817 Adjust.
13818 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13819 (win32_attach): Pass 1 to do_initial_child_stuff.
13820 (win32_kill): Adjust interface. Remove process from processes
13821 table.
13822 (win32_detach): Ditto.
13823 (win32_join): Adjust interface.
13824 (win32_thread_alive): Take a ptid.
13825 (win32_resume): Adjust to use ptids.
13826 (get_child_debug_event): Ditto.
13827 (win32_wait): Adjust interface. Remove exiting process from
13828 processes table.
13829
bd99dc85
PA
138302009-04-01 Pedro Alves <pedro@codesourcery.com>
13831
13832 Non-stop mode support.
13833
13834 * server.h (non_stop): Declare.
13835 (gdb_client_data, handler_func): Declare.
13836 (delete_file_handler, add_file_handler, start_event_loop):
13837 Declare.
13838 (handle_serial_event, handle_target_event, push_event)
13839 (putpkt_notif): Declare.
13840 * target.h (enum resume_kind): New.
13841 (struct thread_resume): Replace `step' field by `kind' field.
13842 (TARGET_WNOHANG): Define.
13843 (struct target_ops) <wait>: Add `options' argument.
13844 <supports_non_stop, async, start_non_stop>: New fields.
13845 (target_supports_non_stop, target_async): New.
13846 (start_non_stop): Declare.
13847 (mywait): Add `options' argument.
13848 * target.c (mywait): Add `options' argument. Print child exit
13849 notifications here.
13850 (start_non_stop): New.
13851 * server.c (non_stop, own_buf, mem_buf): New globals.
13852 (struct vstop_notif): New.
13853 (notif_queue): New global.
13854 (queue_stop_reply, push_event, discard_queued_stop_replies)
13855 (send_next_stop_reply): New.
13856 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13857 interface changes.
13858 (attach_inferior): In non-stop mode, don't wait for the target
13859 here.
13860 (handle_general_set): Handle QNonStop.
13861 (handle_query): When handling qC, return the current general
13862 thread, instead of the first thread of the list.
13863 (handle_query): If the backend supports non-stop mode, include
13864 QNonStop+ in the qSupported query response.
13865 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13866 and non-stop mode.
13867 (handle_v_attach, handle_v_run): Handle non-stop mode.
13868 (handle_v_stopped): New.
13869 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13870 (myresume): Adjust to use resume_kind. Handle non-stop.
13871 (queue_stop_reply_callback): New.
13872 (handle_status): Handle non-stop mode.
13873 (main): Clear non_stop flag on reconnection. Use the event-loop.
13874 Refactor serial protocol handling from here ...
13875 (process_serial_event): ... to this new function. When GDB
13876 selects any thread, select one here. In non-stop mode, wait until
13877 GDB acks all pending events before exiting.
13878 (handle_serial_event, handle_target_event): New.
13879 * remote-utils.c (remote_open): Install remote_desc in the event
13880 loop.
13881 (remote_close): Remove remote_desc from the event loop.
13882 (putpkt_binary): Rename to...
13883 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13884 (putpkt_binary): New as wrapper around putpkt_binary_1.
13885 (putpkt_notif): New.
13886 (prepare_resume_reply): In non-stop mode, don't change the
13887 general_thread.
13888 * event-loop.c: New.
13889 * Makefile.in (OBJ): Add event-loop.o.
13890 (event-loop.o): New rule.
13891
13892 * linux-low.h (pid_of): Moved here.
13893 (lwpid_of): New.
13894 (get_lwp_thread): Use lwpid_of.
13895 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13896 * linux-low.c (pid_of): Delete.
13897 (inferior_pid): Use lwpid_of.
13898 (linux_event_pipe): New.
13899 (target_is_async_p): New.
13900 (delete_lwp): New.
13901 (handle_extended_wait): Use lwpid_of.
13902 (add_lwp): Don't set lwpid field.
13903 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13904 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13905 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13906 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13907 first. Adjust to linux_wait_for_event interface changes. Use
13908 lwpid_of.
13909 (linux_detach): Don't delete the main lwp here.
13910 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13911 (status_pending_p): Don't consider explicitly suspended lwps.
13912 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13913 pointer. Add OPTIONS argument. Change return type to int. Use
13914 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13915 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13916 pointer. Add status pointer argument. Return a pid instead of a
13917 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13918 changes. In non-stop mode, don't switch to a random thread.
13919 (linux_wait): Rename to...
13920 (linux_wait_1): ... this. Add target_options argument, and handle
13921 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13922 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13923 clean exit and signal exit code. Don't stop all threads in
13924 non-stop mode. In all-stop mode, only stop all threads when
13925 reporting a stop to GDB. Handle explicit thread stop requests.
13926 (async_file_flush, async_file_mark): New.
13927 (linux_wait): New.
13928 (send_sigstop): Use lwpid_of.
13929 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13930 interface changes. In non-stop mode, don't switch to a random
13931 thread.
13932 (linux_resume_one_lwp): Use lwpid_of.
13933 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13934 (linux_resume_one_thread): ... this. Handle resume_stop. In
13935 non-stop mode, don't look for pending flag in all threads.
13936 (resume_status_pending_p): Don't consider explicitly suspended
13937 threads.
13938 (my_waitpid): Reimplement. Emulate __WALL.
13939 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13940 Use lwpid_of.
13941 (sigchld_handler, linux_supports_non_stop, linux_async)
13942 (linux_start_non_stop): New.
13943 (linux_target_ops): Register linux_supports_non_stop, linux_async
13944 and linux_start_non_stop.
13945 (initialize_low): Install SIGCHLD handler.
13946 * thread-db.c (thread_db_create_event, find_one_thread)
13947 (thread_db_get_tls_address): Use lwpid_of.
13948 * win32-low.c (win32_detach): Adjust to use resume_kind.
13949 (win32_wait): Add `options' argument.
13950 * spu-low.c (spu_resume): Adjust to use resume_kind.
13951 (spu_wait): Add `options' argument.
13952
5b1c542e
PA
139532009-04-01 Pedro Alves <pedro@codesourcery.com>
13954
13955 Decouple target code from remote protocol.
13956
13957 * target.h (enum target_waitkind): New.
13958 (struct target_waitstatus): New.
13959 (struct target_ops) <wait>: Return an unsigned long. Take a
13960 target_waitstatus pointer instead of a char pointer.
13961 (mywait): Likewise.
13962 * target.c (mywait): Change prototype to return an unsigned long.
13963 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13964 * server.h (thread_from_wait, old_thread_from_wait): Delete
13965 declarations.
13966 (prepare_resume_reply): Change prototype to take a
13967 target_waitstatus.
13968 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13969 (last_status, last_ptid): New.
13970 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13971 pid instead of a signal.
13972 (attach_inferior): Remove "status" and "signal" parameters.
13973 Adjust.
13974 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13975 not as an address.
13976 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13977 (handle_v_requests, myresume): Remove "status" and "signal"
13978 parameters. Adjust.
13979 (handle_status): New.
13980 (main): Delete local `status'. Adjust.
13981 * remote-utils.c: Include target.h.
13982 (prepare_resume_reply): Change prototype to take a
13983 target_waitstatus. Adjust.
13984
13985 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13986 interface.
13987 * spu-low.c (spu_wait): Adjust.
13988 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13989 Delete.
13990 (win32_wait): Adjust.
13991
2bd7c093
PA
139922009-04-01 Pedro Alves <pedro@codesourcery.com>
13993
13994 * target.h (struct thread_resume): Delete leave_stopped member.
13995 (struct target_ops): Add a `n' argument to the `resume' callback.
13996 * server.c (start_inferior): Adjust.
13997 (handle_v_cont, myresume): Adjust.
13998 * linux-low.c (check_removed_breakpoint): Adjust to resume
13999 interface change, and to removed leave_stopped field.
14000 (resume_ptr): Delete.
14001 (struct thread_resume_array): New.
14002 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14003 resume interface change.
14004 (linux_continue_one_thread, linux_queue_one_thread)
14005 (resume_status_pending_p): Check if the resume field is NULL
14006 instead of checking the leave_stopped member.
14007 (linux_resume): Adjust to the target resume interface change.
14008 * spu-low.c (spu_resume): Adjust to the target resume interface
14009 change.
14010 * win32-low.c (win32_detach, win32_resume): Ditto.
14011
c35fafde
PA
140122009-04-01 Pedro Alves <pedro@codesourcery.com>
14013
14014 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14015 flag.
14016 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14017 pending.
14018 (linux_continue_one_thread): Only preserve the stepping flag if
14019 there's a pending breakpoint.
14020
0a59d50b
PA
140212009-03-31 Pedro Alves <pedro@codesourcery.com>
14022
14023 * server.c (main): After the inferior having exited, call
14024 remote_close before exiting gdbserver.
14025
f04c6d38
TJB
140262009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14027
14028 Fix size of FPSCR in Power 7 processors.
14029 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14030 (PPC_FEATURE_HAS_DFP): New #define.
14031 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14032 size of the FPSCR.
14033
78e5cee6
PA
140342009-03-23 Pedro Alves <pedro@codesourcery.com>
14035
14036 * server.c (handle_query) Whitespace and formatting.
14037
1b3f6016
PA
140382009-03-22 Pedro Alves <pedro@codesourcery.com>
14039
14040 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14041 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14042 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14043 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14044 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14045 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14046 Makefile.in, configure.ac: Fix whitespace throughout.
14047 * configure: Regenerate.
14048
a07b2135
PA
140492009-03-22 Pedro Alves <pedro@codesourcery.com>
14050
14051 * inferiors.c (find_inferior): Make it safe for the callback
14052 function to delete the currently iterated inferior.
14053
67cc2626
PA
140542009-03-22 Pedro Alves <pedro@codesourcery.com>
14055
14056 * Makefile.in (linuw_low_h): Move higher.
14057 (thread-db.o): Depend on $(linux_low_h).
14058
54a0b537
PA
140592009-03-17 Pedro Alves <pedro@codesourcery.com>
14060
14061 Rename "process" to "lwp" throughout.
14062
14063 * linux-low.c (all_processes): Rename to...
14064 (all_lwps): ... this.
14065 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14066 (add_process): Rename to ...
14067 (add_lwp): ... this. Adjust.
14068 (linux_create_inferior): Adjust.
14069 (linux_attach_lwp): Adjust.
14070 (linux_attach): Adjust.
14071 (linux_kill_one_process): Rename to ...
14072 (linux_kill_one_lwp): ... this. Adjust.
14073 (linux_kill): Adjust.
14074 (linux_detach_one_process): Rename to ...
14075 (linux_detach_one_lwp): ... this. Adjust.
14076 (linux_detach): Adjust.
14077 (check_removed_breakpoint): Adjust.
14078 (status_pending_p): Adjust.
14079 (linux_wait_for_process): Rename to ...
14080 (linux_wait_for_lwp): ... this. Adjust.
14081 (linux_wait_for_event): Adjust.
14082 (send_sigstop): Adjust.
14083 (wait_for_sigstop): Adjust.
14084 (stop_all_processes): Rename to ...
14085 (stop_all_lwps): ... this.
14086 (linux_resume_one_process): Rename to ...
14087 (linux_resume_one_lwp): ... this. Adjust.
14088 (linux_set_resume_request, linux_continue_one_thread)
14089 (linux_queue_one_thread, resume_status_pending_p)
14090 (usr_store_inferior_registers, regsets_store_inferior_registers)
14091 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14092 Adjust.
14093 * linux-low.h (get_process): Rename to ...
14094 (get_lwp): ... this. Adjust.
14095 (get_thread_process): Rename to ...
14096 (get_thread_lwp): ... this. Adjust.
14097 (get_process_thread): Rename to ...
14098 (get_lwp_thread): ... this. Adjust.
14099 (struct process_info): Rename to ...
14100 (struct lwp_info): ... this.
14101 (all_processes): Rename to ...
14102 (all_lwps): ... this.
14103 * proc-service.c (ps_lgetregs): Adjust.
14104 * thread-db.c (thread_db_create_event, find_one_thread)
14105 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14106
0b16c5cf
PA
141072009-03-14 Pedro Alves <pedro@codesourcery.com>
14108
14109 * server.c (handle_query): Handle "qAttached".
14110
32de4b9d
NS
141112009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14112
14113 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14114 GPLv3, update license URL.
14115
2aecd87f
DE
141162009-03-01 Doug Evans <dje@google.com>
14117
93efd302 14118 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14119 (server_h): Add gdb_signals.h.
14120 (signals.o): Update.
14121 * server.h (target_signal_from_host,target_signal_to_host_p)
14122 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14123
86b1f9c5
PM
141242009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14125
14126 * remote-utils.c (getpkt): Also generate remote-debug
14127 information if noack_mode is set.
14128
4aa995e1
PA
141292009-02-06 Pedro Alves <pedro@codesourcery.com>
14130
14131 * server.c (handle_query): Report qXfer:siginfo:read and
14132 qXfer:siginfo:write as supported and handle them.
14133 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14134 * linux-low.c (linux_xfer_siginfo): New.
14135 (linux_target_ops): Set it.
14136
62709adf
PA
141372009-01-26 Pedro Alves <pedro@codesourcery.com>
14138
14139 * server.c (gdbserver_usage): Mention --remote-debug.
14140 (main): Accept '--remote-debug' switch.
14141
aef93bd7
DE
141422009-01-18 Doug Evans <dje@google.com>
14143
14144 * regcache.c (new_register_cache): No need to check result of xcalloc.
14145 * server.c (handle_search_memory): Back out calls to xmalloc,
14146 result is checked and error is returned to user upon failure.
14147 (handle_query): Ditto. Add more checks for result of malloc.
14148 (handle_v_cont): Check result of malloc, report error back to
14149 user upon failure.
14150 (handle_v_run): Ditto. Call freeargv.
14151 * server.h (freeargv): Declare.
14152 * utils.c (freeargv): New fn.
14153
54363045
DE
141542009-01-15 Doug Evans <dje@google.com>
14155
f626972c
DE
14156 * gdbreplay.c (perror_with_name): Make arg const char *.
14157 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14158 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14159 * utils.c (perror_with_name): Make arg const char *.
54363045 14160
18aae699
PA
141612009-01-14 Pedro Alves <pedro@codesourcery.com>
14162
14163 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14164 when handling a EXIT_PROCESS_DEBUG_EVENT.
14165
ff703abe
JB
141662009-01-06 Joel Brobecker <brobecker@adacore.com>
14167
14168 * gdbreplay.c (gdbreplay_version): Update copyright year.
14169 * server.c (gdbserver_version): Likewise.
14170
f21cc1a2 141712009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14172
14173 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14174 (handle_extended_wait): Improve comment.
0e21c1ec 14175
bca929d3
DE
141762008-12-13 Doug Evans <dje@google.com>
14177
14178 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14179 * server.h (ATTR_MALLOC): New macro.
14180 (xmalloc,xcalloc,xstrdup): Declare.
14181 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14182 * inferiors.c: Ditto.
14183 * linux-low.c: Ditto.
14184 * mem-break.c: Ditto.
14185 * regcache.c: Ditto.
14186 * remote-utils.c: Ditto.
14187 * server.c: Ditto.
14188 * target.c: Ditto.
14189 * win32-low.c: Ditto.
14190
97438e3f
DE
141912008-12-12 Doug Evans <dje@google.com>
14192
896c7fbb
DE
14193 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14194 in debugging printf.
14195
97438e3f
DE
14196 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14197
e3b886f8
DE
141982008-12-09 Doug Evans <dje@google.com>
14199
14200 * linux-low.h (struct process_info): Delete member tid, unused.
14201 * thread-db.c (find_one_thread): Update.
14202 (maybe_attach_thread): Update.
14203
07e059b5
VP
142042008-12-02 Pedro Alves <pedro@codesourcery.com>
14205
889bf7c5
PA
14206 * target.h (struct target_ops): Add qxfer_osdata member.
14207 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14208 and dirent.h.
14209 (linux_qxfer_osdata): New functions.
14210 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14211 callback.
14212 * server.c (handle_query): Handle "qXfer:osdata:read:".
14213 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14214 (buffer_xml_printf): New functions.
14215 * server.h (struct buffer): New.
14216 (buffer_grow_str, buffer_grow_str0): New macros.
14217 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14218 (buffer_xml_printf): Declare.
07e059b5 14219
4cab47ab
DE
142202008-11-24 Doug Evans <dje@google.com>
14221
14222 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14223
f142445f
DJ
142242008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14225
14226 * server.c (handle_v_run): Always use the supplied argument list.
14227
d0107bb6 142282008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14229
d0107bb6
BW
14230 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14231 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14232
2c4ad781
TJB
142332008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14234
14235 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14236 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14237 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14238 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14239 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14240 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14241 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14242 XML target descriptions.
14243 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14244 when inferior is running on an ISA 2.05 or later processor. Add
14245 special case to return offset for full 64-bit slot of FPSCR when
14246 in 32-bits.
14247
dfb64f85
DJ
142482008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14249
14250 * Makefile.in (SFILES, clean): Added sparc64 files.
14251 (reg-sparc64.o, reg-sparc64.c): New.
14252 * configure.srv (sparc*-*-linux*): New configuration.
14253 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14254 syscall arguments for SPARC.
14255 (regsets_store_inferior_registers): Likewise.
14256 * linux-sparc-low.c: New file.
14257
66b6e1dd
DE
142582008-10-21 Doug Evans <dje@google.com>
14259
14260 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14261 (READLINE_DIR,READLINE_DEP): Delete.
14262 (INTERNAL_CFLAGS): Update.
14263 (LINTFLAGS): Update.
14264
9b710a42
PA
142652008-10-10 Pedro Alves <pedro@codesourcery.com>
14266
14267 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14268 whole argv from the last run, not just argv[0].
14269
5822d809
PA
142702008-09-08 Pedro Alves <pedro@codesourcery.com>
14271
14272 * regcache.c (new_register_cache): Return NULL if the register
14273 cache size isn't known yet.
14274 (free_register_cache): Avoid dereferencing a NULL regcache.
14275
74aac56f
DJ
142762008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14277
14278 * configure.srv: Merge MIPS and MIPS64.
14279
400b20f5
MR
142802008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14281
14282 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14283
677c5bb1
LM
142842008-08-18 Luis Machado <luisgpm@br.ibm.com>
14285
14286 * Makefile.in: Add required vsx dependencies.
14287
14288 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14289 Declare init_registers_powerpc_vsx32l.
14290 Declare init_registers_powerpc_vsx64l.
14291 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14292 (ppc_arch_setup): Check for VSX in hwcap.
14293 (ppc_fill_vsxregset): New function.
14294 (ppc_store_vsxregset): New function.
14295 Add new VSX entry in regset_info target_regsets.
14296
14297 * configure.srv: Add new VSX dependencies.
14298
a6f3e723
SL
142992008-08-12 Pedro Alves <pedro@codesourcery.com>
14300
14301 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14302 (remote_open): Set or clear transport_is_reliable.
14303 (putpkt_binary): Don't expect acks in noack mode.
14304 (getpkt): Don't send ack/nac in noack mode.
14305 * server.c (handle_general_set): Handle QStartNoAckMode.
14306 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14307 qSupported.
14308 (main): Reset noack_mode on every connection.
14309 * server.h (noack_mode): Declare.
14310
a417dc56
RW
143112008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14312
14313 * Makefile.in (GDBREPLAY_OBS): New variable.
14314 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14315
3221518c
UW
143162008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14317 Daniel Jacobowitz <dan@codesourcery.com>
14318
14319 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14320 (usr_store_inferior_registers): Likewise.
14321 (regsets_store_inferior_registers): Likewise.
14322
ec56be1b
PA
143232008-07-31 Rolf Jansen <rj@surtec.com>
14324 Pedro Alves <pedro@codesourcery.com>
14325
14326 * configure.ac: Check for memmem declaration.
14327 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14328 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14329 (disable_packet_qfThreadInfo): Unconditionally compile.
14330 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14331 * configure, config.in: Regenerate.
14332
2fe5e3ff
DE
143332008-07-28 Doug Kwan <dougkwan@google.com>
14334
14335 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14336 (linux_write_memory): Remove declaration of errno.
14337
836acd6d
UW
143382008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14339
14340 * linux-low.c (handle_extended_wait): Do not use "status"
14341 variable uninitialized.
14342
aeba519e
PA
143432008-07-07 Pedro Alves <pedro@codesourcery.com>
14344
14345 * server.c (handle_v_attach): Inhibit reporting dll changes.
14346
db42f210
PA
143472008-06-27 Pedro Alves <pedro@codesourcery.com>
14348
14349 * remote-utils.c (prepare_resume_reply): If requested, don't
14350 output "thread:TID" in the T stop reply.
14351
14352 * server.c (disable_packet_vCont, disable_packet_Tthread)
14353 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14354 (handle_query): If requested, disable support for qC, qfThreadInfo
14355 and qsThreadInfo.
14356 (handle_v_requests): If requested, disable support for vCont.
14357 (gdbserver_show_disableable): New.
14358 (main): Handle --disable-packet and --disable-packet=LIST.
14359
14360 * server.h (disable_packet_vCont, disable_packet_Tthread)
14361 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14362
8e4c5421
CD
143632008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14364
14365 * server.c (gdbserver_usage): Mention --version.
14366
6e23a804
DJ
143672008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14368
14369 * Makefile.in (gdbreplay.o): New rule.
14370
90aa6a40
JM
143712008-06-06 Joseph Myers <joseph@codesourcery.com>
14372
14373 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14374 message, not gdbserver.
14375
c16158bc 143762008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14377 Nathan Sidwell <nathan@codesourcery.com>
14378 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14379
14380 * acinclude.m4: Include ../../config/acx.m4.
14381 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14382 * configure, config.in: Regenerate.
14383 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14384 * server.c (gdbserver_version): Print PKGVERSION.
14385 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14386 (main): Adjust gdbserver_usage calls.
14387 * gdbreplay.c (version, host_name): Add declarations.
14388 (gdbreplay_version, gdbreplay_usage): New.
14389 (main): Accept --version and --help options.
14390
aeb75bf5
DJ
143912008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14394 (arm_breakpoint_at): Handle Thumb.
14395 (the_low_target): Add comment.
14396
76b233dd
UW
143972008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14398
14399 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14400
08388c79
DE
144012008-05-09 Doug Evans <dje@google.com>
14402
a3c83fae
DE
14403 * server.h (decode_search_memory_packet): Declare.
14404 * remote-utils.c (decode_search_memory_packet): New fn.
14405 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14406 (handle_search_memory): New fn.
14407 (handle_query): Process qSearch:memory packets.
14408
bb9c3d36
UW
144092008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14410
14411 * regcache.c (registers_length): Remove.
14412 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14413 full register packet.
14414 * regcache.h (registers_length): Remove prototype.
14415 * server.h (PBUFSIZ): Define to 16384.
14416
7284e1be
UW
144172008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14418
14419 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14420 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14421 powerpc-64l.o, and powerpc-altivec64l.o.
14422 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14423 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14424 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14425 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14426 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14427 to srv_xmlfiles.
14428
14429 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14430 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14431 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14432 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14433 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14434 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14435 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14436 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14437 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14438 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14439 (clean): Update.
14440
14441 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14442 (init_registers_powerpc_32l): ... this new prototype.
14443 (init_registers_powerpc_32): Remove, replace by ...
14444 (init_registers_powerpc_altivec32l): ... this new prototype.
14445 (init_registers_powerpc_e500): Remove, replace by ...
14446 (init_registers_powerpc_e500l): ... this new prototype.
14447 (init_registers_ppc64): Remove, replace by ...
14448 (init_registers_powerpc_64l): ... this new prototype.
14449 (init_registers_powerpc_64): Remove, replace by ...
14450 (init_registers_powerpc_altivec64l): ... this new prototype.
14451 (ppc_num_regs): Set to 73.
14452 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14453 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14454 (ppc_cannot_store_register): Handle orig_r3 and trap.
14455 (ppc_arch_setup): Update init_registers_... calls.
14456 (ppc_fill_gregset): Handle orig_r3 and trap.
14457
14458 * inferiors.c (clear_inferiors): Reset current_inferior.
14459
fdc59709
PB
144602008-04-23 Paolo Bonzini <bonzini@gnu.org>
14461
889bf7c5
PA
14462 * acinclude.m4: Add override.m4.
14463 * configure: Regenerate.
fdc59709 14464
c9b2f845
UW
144652008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14466
14467 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14468 initial call to init_register_ppc64.
14469
550512b8
UW
144702008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14471
43aaf8b6
PA
14472 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14473 single powerpc*-*-linux* case.
550512b8
UW
14474 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14475
b6430ec3
UW
144762008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14477
14478 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14479 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14480 from reg_xmlfiles.
14481 * linux-ppc-low.c: Include <elf.h>.
14482 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14483 (ppc_hwcap): New global variable.
14484 (ppc_regmap): Remove __SPE__ #ifdef sections.
14485 (ppc_regmap_e500): New global variable.
14486 (ppc_cannot_store_register): Update __SPE__ special case.
14487 (ppc_get_hwcap): New function.
14488 (ppc_arch_setup): Use it to determine whether inferior supports
14489 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14490 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14491 Do not access registers if target does not support AltiVec.
14492 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14493 Do not access registers if target does not support SPE.
14494 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14495
52fa2412
UW
144962008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * linux-low.c (disabled_regsets, num_regsets): New.
14499 (use_regsets_p): Delete.
14500 (linux_wait_for_process): Clear disabled_regsets.
14501 (regsets_fetch_inferior_registers): Check and set it.
14502 (regsets_store_inferior_registers): Likewise.
14503 (linux_fetch_registers, linux_store_registers): Do not use
14504 use_regsets_p.
14505 (initialize_low): Allocate disabled_regsets.
14506
e28b3332
DJ
145072008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14508
14509 * Makefile.in (LIBOBJS): New.
14510 (OBS): Use LIBOBJS.
14511 (memmem.o): New rule.
14512 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14513 * configure: Regenerated.
14514
4536995d
UW
145152008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14516
14517 * server.c (handle_query): Never return "unsupported" for
14518 qXfer:features:read queries.
14519
221c031f
UW
145202008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14521
14522 * server.c (get_features_xml): Fix inverted condition.
14523 (handle_query): Always support qXfer:feature:read.
14524
ccd213ac
DJ
145252008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14526
14527 * server.c (wrapper_argv): New.
14528 (start_inferior): Handle wrapper_argv. If set, expect an extra
14529 trap.
14530 (gdbserver_usage): Document --wrapper.
14531 (main): Parse --wrapper.
14532
6fe305f7
UW
145332008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14534
14535 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14536 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14537 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14538 (ppc_set_pc): Likewise.
14539 (ppc_arch_setup): New function.
14540 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14541 of collect_register.
889bf7c5 14542 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14543
5b0a002e
UW
145442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14545
14546 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14547 instead of linux-ppc64-low.o.
14548 * linux-ppc64-low.c: Remove file.
14549 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14550 (linux-ppc64-low.o): Remove rule.
14551
14552 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14553 (init_registers_powerpc_64): Likewise.
14554 (ppc_regmap): Conditionally define depending on __powerpc64__.
14555 (ppc_cannot_store_register): Do not special-case "fpscr" when
14556 compiled on __powerpc64__.
14557 (ppc_collect_ptrace_register): New function.
14558 (ppc_supply_ptrace_register): New function.
14559 (ppc_breakpoint): Change type to "unsigned int".
14560 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14561 (the_low_target): Conditionally provide initializers for the
889bf7c5 14562 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14563 collect_ptrace_register and supply_ptrace_register members.
14564
9b4b61c8
UW
145652008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14566
14567 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14568 * server.c (gdbserver_xmltarget): Define.
14569 (get_features_xml): Use it to replace "target.xml" and arch_string.
14570
14571 * configure.srv: Remove srv_xmltarget. Add XML files that were
14572 mentioned there to srv_xmlfiles instead. Remove conditional tests
14573 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14574 srv_xmlfiles and srv_regobj to include all possible choices.
14575 * configure.ac (srv_xmltarget): Remove.
14576 (srv_xmlfiles): Do not add "target.xml".
14577 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14578 checks for supplementary target information.
14579 * configure: Regenerate.
14580 * Makefile.in (XML_TARGET): Remove.
14581 (target.xml): Remove rule.
14582 (clean): Do not clean up target.xml.
14583 (.PRECIOUS): Do not mention target.xml.
14584
14585 * target.h (struct target_ops): Remove arch_string member.
14586 * linux-low.c (linux_arch_string): Remove.
14587 (linux_target_ops): Remove arch_string initializer.
14588 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14589 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14590 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14591 * spu-low.c (spu_arch_string): Remove.
14592 (spu_target_ops): Remove arch_string initializer.
14593 * win32-low.c (win32_arch_string): Remove.
14594 (win32_target_ops): Remove arch_string initializer.
14595 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14596 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14597 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14598
ee1a7ae4
UW
145992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14600
14601 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14602 by collect_ptrace_register and supply_ptrace_register hooks.
14603 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14604 instead of checking for the_low_target.left_pad_xfer.
14605 (usr_store_inferior_registers): Use collect_ptrace_register callback
14606 instead of checking for the_low_target.left_pad_xfer.
14607
14608 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14609 (s390_supply_ptrace_register): Likewise.
14610 (s390_fill_gregset): Call s390_collect_ptrace_register.
14611 (the_low_target): Update.
14612
14613 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14614 (ppc_supply_ptrace_register): Likewise.
14615 (the_low_target): Update.
14616
14617 * linux-i386-low.c (the_low_target): Update.
14618 * linux-x86-64-low.c (the_low_target): Update.
14619
d61ddec4
UW
146202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14621
14622 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14623 reg-s390.o and reg-s390x.o.
14624
14625 * linux-low.c (new_inferior): New global variable.
14626 (linux_create_inferior, linux_attach): Set it.
14627 (linux_wait_for_process): Call the_low_target.arch_setup after the
14628 target has stopped for the first time.
14629 (initialize_low): Do not call the_low_target.arch_setup.
14630
14631 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14632 (s390_set_pc): Likewise.
14633 (s390_arch_setup): New function.
14634 (the_low_target): Use s390_arch_setup as arch_setup routine.
14635
14636 * regcache.c (realloc_register_cache): New function.
14637 (set_register_cache): Call it for each existing regcache.
14638
d05b4ac3
UW
146392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14640
14641 * server.h (init_registers): Remove prototype.
14642
14643 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14644 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14645 instead of init_registers ().
14646 * linux-arm-low.c (init_registers_arm): Add prototype.
14647 (init_registers_arm_with_iwmmxt): Likewise.
14648 (the_low_target): Add initializer for arch_setup field.
14649 * linux-cris-low.c (init_registers_cris): Add prototype.
14650 (the_low_target): Add initializer for arch_setup field.
14651 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14652 (the_low_target): Add initializer for arch_setup field.
14653 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14654 (the_low_target): Add initializer for arch_setup field.
14655 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14656 (the_low_target): Add initializer for arch_setup field.
14657 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14658 (the_low_target): Add initializer for arch_setup field.
14659 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14660 (the_low_target): Add initializer for arch_setup field.
14661 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14662 (init_registers_mips64_linux): Likewise.
14663 (the_low_target): Add initializer for arch_setup field.
14664 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14665 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14666 (the_low_target): Add initializer for arch_setup field.
14667 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14668 (init_registers_powerpc_64): Likewise.
14669 (the_low_target): Add initializer for arch_setup field.
14670 * linux-s390-low.c (init_registers_s390): Add prototype.
14671 (init_registers_s390x): Likewise.
14672 (the_low_target): Add initializer for arch_setup field.
14673 * linux-sh-low.c (init_registers_sh): Add prototype.
14674 (the_low_target): Add initializer for arch_setup field.
14675 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14676 (the_low_target): Add initializer for arch_setup field.
14677 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14678 (the_low_target): Add initializer for arch_setup field.
14679
14680 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14681 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14682 instead of init_registers ().
14683 * win32-arm-low.c (init_registers_arm): Add prototype.
14684 (the_low_target): Add initializer for arch_setup field.
14685 * win32-i386-low.c (init_registers_i386): Add prototype.
14686 (the_low_target): Add initializer for arch_setup field.
14687
14688 * spu-low.c (init_registers_spu): Add prototype.
14689 (initialize_low): Call initialie_registers_spu () instead of
14690 initialize_registers ().
14691
fd96d250
PA
146922008-02-19 Pedro Alves <pedro@codesourcery.com>
14693
14694 * server.c (handle_v_requests): When handling the vRun and vAttach
14695 packets, if already debugging a process, don't kill it. Return an
14696 error instead.
14697
d41b6bb4
DJ
146982008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14699
14700 * server.c (handle_query): Correct length check.
14701
5ac588cf
PA
147022008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14703
14704 * win32-low.c (do_initial_child_stuff): Add process handle
14705 parameter. Set current_process_handle and current_process_id from the
14706 parameters. Clear globals.
14707 (win32_create_inferior): Don't set current_process_handle and
14708 current_process_id here. Instead pass them on the call to
14709 do_initial_child_stuff.
14710 (win32_attach): Likewise.
14711 (win32_clear_inferiors): New.
14712 (win32_kill): Don't close the current process handle or the
14713 current thread handle here. Instead call win32_clear_inferiors.
14714 (win32_detach): Don't open a new handle to the process. Call
14715 win32_clear_inferiors.
14716 (win32_join): Don't rely on current_process_handle; open a new
14717 handle using the process id.
14718 (win32_wait): Call win32_clear_inferiors when the inferior process
14719 has exited.
14720
ecd7ecbc
DJ
147212008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14722
14723 * server.c (monitor_show_help): Add "exit".
14724
1525d545
MG
147252008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14726
ecd7ecbc 14727 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14728 (clean): Add reg-xtensa.c.
14729 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14730 * configure.srv (xtensa*-*-linux*) New target.
14731 * linux-xtensa-low.c: New.
14732 * xtensa-xtregs.c: New.
1525d545 14733
59a016f0
PA
147342008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14735
14736 * hostio.c: Don't include errno.h.
14737 (errno_to_fileio_errno): Move to hostio-errno.
14738 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14739 error number outputting to the target->hostio_last_error callback.
14740 (hostio_packet_error): Use FILEIO_EINVAL directly.
14741 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14742 calls to hostio_error.
14743 * hostio-errno.c: New.
14744 * server.h (hostio_last_error_from_errno): Declare.
14745 * target.h (target_ops): Add hostio_last_error member.
14746 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14747 as hostio_last_error handler.
889bf7c5 14748 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14749 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14750 (wince_hostio_last_error): New functions.
14751 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14752 as hostio_last_error handler.
14753 (win32_target_ops) [!_WIN32_WCE]: Register
14754 hostio_last_error_from_errno as hostio_last_error handler.
14755 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14756 (hostio-errno.o): New rule.
14757 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14758 * configure.srv (srv_hostio_err_objs): New variable. Default to
14759 hostio-errno.o.
14760 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14761 * configure: Regenerate.
14762
2d717e4f
DJ
147632008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14766 (linux_kill, linux_detach): Clean up the process list.
14767 * remote-utils.c (remote_open): Improve port number parsing.
14768 (putpkt_binary, input_interrupt): Only send interrupts if the target
14769 is running.
14770 * server.c (extended_protocol): Make static.
14771 (attached): Define earlier.
14772 (exit_requested, response_needed, program_argv): New variables.
14773 (target_running): New.
14774 (start_inferior): Clear attached here.
14775 (attach_inferior): Set attached here.
14776 (require_running): Define.
14777 (handle_query): Use require_running and target_running. Implement
14778 "monitor exit".
14779 (handle_v_attach, handle_v_run): New.
14780 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14781 (gdbserver_usage): Update.
14782 (main): Redo argument parsing. Handle --debug and --multi. Handle
14783 --attach along with other options or after the port. Save
14784 program_argv. Support no initial program. Resynchronize
14785 communication with GDB after an error. Handle "monitor exit".
14786 Use require_running and target_running. Always allow the extended
14787 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14788 restart in extended mode.
14789 * README: Refer to the GDB manual. Update --attach usage.
14790
7407e2de
AS
147912007-12-20 Andreas Schwab <schwab@suse.de>
14792
14793 * linux-low.c (STACK_SIZE): Define.
14794 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14795 (linux_test_for_tracefork): Likewise.
14796
b65d95c5
DJ
147972007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14798
14799 * linux-low.c (linux_wait_for_event): Update messages. Do not
14800 reinsert auto-delete breakpoints.
14801 * mem-break.c (struct breakpoint): Change return type of handler to
14802 int.
14803 (set_breakpoint_at): Update handler type.
14804 (reinsert_breakpoint_handler): Return 1 instead of calling
14805 delete_breakpoint.
14806 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14807 setting a new one.
14808 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14809 * mem-break.h (set_breakpoint_at): Update handler type.
14810 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14811 * win32-low.c (auto_delete_breakpoint): New.
14812 (get_child_debug_event): Use it.
14813
4e799345
DJ
148142007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14815
14816 * configure.ac: Check for pread and pwrite.
14817 * hostio.c (handle_pread): Fall back to lseek and read.
14818 (handle_pwrite): Fall back to lseek and write.
14819 * config.in, configure: Regenerated.
14820
27524b67
DJ
148212007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14822
14823 * server.c (myresume): Add own_buf argument.
14824 (main): Update calls.
14825
a20d5e98
DJ
148262007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14827
14828 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14829 * remote-utils.c (remote_open): Do not call disable_async_io.
14830 (block_async_io): Delete.
14831 (unblock_async_io): Make static.
14832 (initialize_async_io): New.
14833 * server.c (handle_v_cont): Handle async I/O here.
14834 (myresume): Likewise. Move other common resume tasks here...
14835 (main): ... from here. Call initialize_async_io. Disable async
14836 I/O before the main loop.
14837 * server.h (initialize_async_io): Declare.
14838 (block_async_io, unblock_async_io): Delete prototypes.
14839 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14840
b79d787e
DJ
148412007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14842
14843 * remote-utils.c (readchar): Allow binary data in received messages.
14844
d97903b2
PA
148452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14846
14847 * win32-low.c (attaching): New global.
14848 (win32_create_inferior): Clear the `attaching' global.
14849 (win32_attach): Set the `attaching' global.
14850 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14851 attaching. Only set a breakpoint at the entry point if not
14852 attaching.
14853
311de423
PA
148542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14855
14856 * server.c (main): Don't report dll events on the initial
14857 connection on attaches.
14858
6c2d16d2
PA
148592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14860
14861 * server.c (main): Relax numerical bases supported for the pid of
14862 the --attach command line argument.
14863
5ca906e6
PA
148642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14865
14866 * win32-low.c (win32_attach): Call OpenProcess before
14867 DebugActiveProcess, not after. Add last error output to error
14868 call.
14869
9c6c8194
PA
148702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14871
14872 * win32-low.c (win32_get_thread_context)
14873 (win32_set_thread_context): New functions.
14874 (thread_rec): Use win32_get_thread_context.
14875 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14876 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14877 field.
14878
4d5d1aaa
PA
148792007-12-03 Leo Zayas
14880 Pedro Alves <pedro_alves@portugalmail.pt>
14881
14882 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14883 global variables.
14884 (child_add_thread): Minor cleanup.
14885 (child_continue): Resume artificially suspended threads before
14886 calling ContinueDebugEvent.
14887 (suspend_one_thread): New.
14888 (fake_breakpoint_event): New.
14889 (get_child_debug_event): Change return type to int. Check here if
14890 gdb sent an interrupt request. If a soft interrupt was requested,
14891 fake a breakpoint event. Return 0 if there is no event to handle,
14892 and 1 otherwise.
14893 (win32_wait): Don't check here if gdb sent an interrupt request.
14894 Ensure there is a valid event to handle.
14895 (win32_request_interrupt): Add soft interruption method as last
14896 resort.
14897
c436e841
PA
148982007-12-03 Leo Zayas
14899 Pedro Alves <pedro_alves@portugalmail.pt>
14900
14901 * win32-low.h (win32_thread_info): Add descriptions to the
14902 structure members. Replace `suspend_count' counter by a
14903 `suspended' flag.
14904 * win32-low.c (thread_rec): Update condition of when to get the
14905 context from the inferior. Rely on ContextFlags being set if it
14906 has already been retrieved. Only suspend the inferior thread if
14907 we haven't already. Warn if that fails.
14908 (continue_one_thread): s/suspend_count/suspended/. Only call
14909 ResumeThread once. Warn if that fails.
14910
e7b5fa67
PA
149112007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14912
14913 * win32-low.c (win32_wait): Don't read from the inferior when it
14914 has already exited.
14915
a385171d
PA
149162007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14917
14918 * Makefile.in (win32_low_h): New variable.
14919 (win32-low.o): Add dependency on $(win32_low_h).
14920 (win32-arm-low.o, win32-i386-low.o): New rules.
14921
f80c84b3
DJ
149222007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14923
14924 * hostio.c: Correct copyright year.
14925
a6b151f1
DJ
149262007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14927
14928 * Makefile.in (OBS): Add hostio.o.
14929 (hostio.o): New rule.
14930 * server.h (handle_vFile): Declare.
14931 * hostio.c: New file.
14932 * server.c (handle_v_requests): Take packet_len and new_packet_len
14933 for binary packets. Call handle_vFile.
14934 (main): Update call to handle_v_requests.
14935
f9387fc3
DJ
149362007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14937
14938 * linux-low.c: Include <sched.h>.
14939
51c2684e
DJ
149402007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * linux-low.c (linux_tracefork_grandchild): New.
14943 (linux_tracefork_child): Use clone.
14944 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14945
75f83163
JB
149462007-10-31 Joel Brobecker <brobecker@adacore.com>
14947
14948 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14949
da5898ce
DJ
149502007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14951
14952 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14953
24a09b5f
DJ
149542007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * inferiors.c (change_inferior_id): Delete.
14957 (add_pid_to_list, pull_pid_from_list): New.
14958 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14959 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14960 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14961 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14962 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14963 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14964 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14965 (using_threads): Always set to 1.
14966 (handle_extended_wait): New.
14967 (add_process): Do not set TID.
14968 (linux_create_inferior): Set must_set_ptrace_flags.
14969 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14970 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14971 (linux_thread_alive): Rename TID argument to LWPID.
14972 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14973 (linux_wait_for_event): Do not use TID or check using_threads. Update
14974 call to dead_thread_notify. Call handle_extended_wait.
14975 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14976 (send_sigstop): Delete sigstop_sent.
14977 (wait_for_sigstop): Avoid TID.
14978 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14979 (linux_test_for_tracefork): New.
14980 (linux_lookup_signals): Use thread_db_active and
14981 linux_supports_tracefork_flag.
14982 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14983 * linux-low.h (get_process_thread): Avoid TID.
14984 (struct process_ifo): Move thread_known and tid to the end. Remove
14985 sigstop_sent.
14986 (linux_attach_lwp, thread_db_init): Update prototypes.
14987 * server.h (change_inferior_id): Delete prototype.
14988 (add_pid_to_list, pull_pid_from_list): New prototypes.
14989 * thread-db.c (thread_db_use_events): New.
14990 (find_first_thread): Rename to...
14991 (find_one_thread): ...this. Update callers and messages. Do not
14992 call fatal. Check thread_db_use_events. Do not call
14993 change_inferior_id or new_thread_notify.
14994 (maybe_attach_thread): Update. Do not call new_thread_notify.
14995 (thread_db_init): Set thread_db_use_events. Check use_events.
14996 * utils.c (fatal, warning): Correct message prefix.
14997
30ed0a8f
DJ
149982007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14999
15000 * Makefile.in (clean): Remove new files.
15001 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15002 (powerpc-64.o, powerpc-64.c): New rules.
15003 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15004 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15005 with SPE.
15006 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15007 SPE targets.
15008 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15009 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15010 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15011 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15012 (target_regsets): Add AltiVec and SPE register sets.
15013 * configure.ac: Check for AltiVec and SPE.
15014 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15015 (ppc_fill_vrregset, ppc_store_vrregset): New.
15016 (target_regsets): Add AltiVec register set.
15017 * configure: Regenerated.
15018
fd462a61
DJ
150192007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15020
15021 * linux-low.c (O_LARGEFILE): Define.
15022 (linux_read_memory): Use /proc/PID/mem.
15023 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15024 * configure, config.in: Regenerated.
15025
69f223ed
DJ
150262007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15027
15028 * linux-low.c (linux_wait_for_event): Do not pass signals while
15029 single-stepping.
15030
aec18585
PA
150312007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15032
15033 * win32-low.c (create_process): New.
15034 (win32_create_inferior): Use create_process instead of
15035 CreateProcess. If create_process failed retry appending an ".exe"
15036 suffix. Store the GetLastError result immediatelly after
15037 create_process calls and use it on the call to error.
15038
34d86ddd
PA
150392007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15040
15041 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15042
5a0e3bd0
JB
150432007-08-23 Joel Brobecker <brobecker@adacore.com>
15044
15045 * configure.ac: Switch license to GPLv3.
15046
f88c79e6
MS
150472007-08-01 Michael Snyder <msnyder@access-company.com>
15048
15049 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15050
6b3d9b83
PA
150512007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15052
15053 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15054 typedef.
15055 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15056 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15057 CloseToolhelp32Snapshot.
15058 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15059 CloseToolhelp32Snapshot.
15060
c588c53c
MS
150612007-07-27 Michael Snyder <michael.snyder@access-company.com>
15062
15063 * server.c (main): Check for inferior exit before main loop.
15064
aa0403d9
PA
150652007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15066
15067 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15068 instead of on tmp_desc.
15069
255e7678
DJ
150702007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15071 Daniel Jacobowitz <dan@codesourcery.com>
15072
15073 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15074 (add_thread): Minor cleanups.
15075 (clear_inferiors): Move lower in the file. Clear the DLL
15076 list.
15077 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15078 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15079 (xml_escape_text): New.
15080 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15081 for qSupported.
15082 (handle_v_cont): Report errors.
15083 (gdbserver_version): Update.
15084 (main): Correct size of own_buf. Do not report initial DLL events.
15085 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15086 (unloaded_dll, xml_escape_text): New.
15087 * win32-low.c (enum target_waitkind): Update comments.
15088 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15089 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15090 (win32_EnumProcessModules, win32_GetModuleInformation)
15091 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15092 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15093 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15094 (win32_Module32First, win32_Module32Next, load_toolhelp)
15095 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15096 (get_child_debug_event): Handle DLL events.
15097 (win32_wait): Likewise.
15098
0d37add9
DJ
150992007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15100
15101 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15102 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15103
45e2715e
PA
151042007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15105
15106 * win32-low.c (handle_output_debug_string): Ignore event if not
15107 waiting.
15108
c5674cf1
PA
151092007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15110
15111 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15112
2bbe3cc1
DJ
151132007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15114
15115 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15116
ae13219e
DJ
151172007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15118
15119 * inferiors.c (change_inferior_id): Add comment.
15120 * linux-low.c (check_removed_breakpoint): Add an early
15121 prototype. Improve debug output.
15122 (linux_attach): Doc update.
15123 (linux_detach_one_process, linux_detach): Clean up before releasing
15124 each process.
15125 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15126 * linux-low.h (struct process_info): Doc improvement.
15127 * mem-break.c (delete_all_breakpoints): New.
15128 * mem-break.h (delete_all_breakpoints): New prototype.
15129 * thread-db.c (find_first_thread): New.
15130 (thread_db_create_event): Call it instead of
15131 thread_db_find_new_threads. Clean up unused variables.
15132 (maybe_attach_thread): Remove first thread handling.
15133 (thread_db_find_new_threads): Use find_first_thread.
15134 (thread_db_get_tls_address): Likewise.
15135
4105de34
DJ
151362007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15137
15138 * thread-db.c (thread_db_find_new_threads): Add prototype.
15139 (thread_db_create_event): Check for the main thread before adding
15140 a new thread.
15141 (maybe_attach_thread): Only enable event reporting if TID == 0.
15142 (thread_db_get_tls_address): Check for new threads.
15143
2b876972
DJ
151442007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15145
15146 * linux-low.c (linux_create_inferior): Try execv before execvp.
15147 * spu-low.c (spu_create_inferior): Likewise.
15148
7a245884
DJ
151492007-06-13 Mike Frysinger <vapier@gentoo.org>
15150
15151 * linux-low.c (linux_create_inferior): Change execv to execvp.
15152 * spu-low.c (spu_create_inferior): Likewies.
15153
117ce543
DJ
151542007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * Makefile.in (clean): Clean new files instead of deleted ones.
15157 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15158 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15159 rules.
15160 * configure.srv: Specify XML files and new regformats for MIPS and
15161 MIPS64 GNU/Linux.
15162 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15163 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15164 an entry for the restart register.
15165 (mips_cannot_fetch_register, mips_cannot_store_register)
15166 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15167 register names to match the XML descriptions.
15168 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15169 restart register instead of $0.
15170
0e7f50da
UW
151712007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15172 Markus Deuling <deuling@de.ibm.com>
15173
15174 * remote-utils.c (decode_xfer_write): New function.
15175 * server.h (decode_xfer_write): Add prototype.
15176 * server.c (handle_query): Add PACKET_LEN argument. Support
15177 qXfer:spu:read and qXfer:spu:write packets.
15178 (main): Pass packet_len to handle_query.
15179 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15180 * target.h (target_ops): Add qxfer_spu.
15181
374c1d38
UW
151822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15183
15184 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15185 accessing non-seekable spufs files.
15186
bb63802a
UW
151872007-05-16 Markus Deuling <deuling@de.ibm.com>
15188
889bf7c5 15189 * server.c (handle_query): Add reply for qC packet.
bb63802a 15190
7390519e
PA
151912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15192 Leo Zayas <lerele@champenstudios@com>
15193
15194 * server.h (check_remote_input_interrupt_request): New function.
15195 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15196 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15197 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15198 (check_remote_input_interrupt_request): New function.
15199 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15200 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15201 winapi_GenerateConsoleCtrlEvent): New typedefs.
15202 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15203 to 250 ms.
15204 (win32_wait): Check for remote interrupt request
15205 with check_remote_input_interrupt_request.
15206 (win32_request_interrupt): New function.
15207 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15208
34b34921
PA
152092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15210
15211 * win32-low.c (debug_registers_changed,
15212 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15213 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15214 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15215 (thread_rec): Get context using the low target.
15216 (child_add_thread): Call thread_added on the low target,
15217 which does the same thing.
15218 (regptr): Delete.
15219 (do_initial_child_stuff): Remove debug registers references.
15220 Set context using the low target. Resume threads after
15221 setting the contexts.
15222 (child_continue): Remove dead variable. Remove debug
15223 registers references.
15224 (child_fetch_inferior_registers): Go through the low target.
15225 (do_child_store_inferior_registers): Remove.
15226 (child_store_inferior_registers): Go through the low target.
15227 (win32_resume): Remove debug registers references.
15228 Set context using the low target.
15229 (handle_exception): Change return type to void. Don't record
15230 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15231 first chance exception.
889bf7c5 15232 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15233 goto loop. Always return after waiting for debug event.
15234 (win32_wait): Convert to switch statement. Handle spurious
15235 events.
15236
15237 * win32-i386-low.c (debug_registers_changed,
15238 debug_registers_used): New.
15239 (initial_stuff): Rename to ...
15240 (i386_initial_stuff): ... this. Clear debug registers
15241 state variables.
15242 (store_debug_registers): Delete.
15243 (i386_get_thread_context): New.
15244 (load_debug_registers): Delete.
15245 (i386_set_thread_context): New.
15246 (i386_thread_added): New.
15247 (single_step): Rename to ...
15248 (i386_single_step): ... this.
15249 (do_fetch_inferior_registers): Rename to ...
15250 (i386_fetch_inferior_register): ... this.
15251 (i386_store_inferior_register): New.
15252 (the_low_target): Adapt to new interface.
15253
15254 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15255 (arm_get_thread_context): New.
15256 (arm_set_thread_context): New.
15257 (regptr): New.
15258 (do_fetch_inferior_registers): Rename to ...
15259 (arm_fetch_inferior_register): ... this.
15260 (arm_store_inferior_register): New.
15261 (arm_wince_breakpoint): Reimplement as unsigned long.
15262 (arm_wince_breakpoint_len): Define.
15263 (the_low_target): Adapt to new interface.
15264
15265 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15266 load_debug_registers. Add get_thread_context, set_thread_context,
15267 thread_added and store_inferior_register. Rename
15268 fetch_inferior_registers to fetch_inferior_register.
15269 (regptr): Remove declaration.
15270
dd6953e1
PA
152712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15272
15273 * linux-low.c (linux_detach): Change return type to int. Return 0.
15274 * spu-low.c (spu_detach): Likewise.
15275
444d6139
PA
152762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15277
15278 * target.h (target_ops): Change return type of detach to int.
15279 Add join.
15280 (join_inferior): New.
15281 * server.c (main): Don't skip detach support on mingw32.
15282 If the inferior doesn't support detaching return error.
15283 Call join_inferior instead of using waitpid.
15284 * linux-low.c (linux_join): New.
15285 (linux_target_op): Add linux_join.
15286 * spu-low.c (spu_join): New.
15287 (spu_target_ops): Add spu_join.
15288 * win32-low.c (win32_detach): Adapt to new interface.
15289 Reopen current_process_handle before detaching. Issue a child
15290 resume before detaching.
15291 (win32_join): New.
15292 (win32_target_op): Add win32_join.
15293
1d5315fe
PA
152942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15295
15296 * win32-low.c (win32-attach): Fix return value.
15297 * target.h (target_ops): Describe ATTACH return values.
15298
bf914831
PA
152992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15300
15301 * win32-low.c (GETPROCADDRESS): Define.
15302 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15303 (winapi_DebugSetProcessKillOnExit): Likewise.
15304 (win32_create_inferior): Force usage of ansi CreateProcessA.
15305 (win32_attach): Use GETPROCADDRESS.
15306 (win32_detach): Likewise.
15307
f72f3e60
PA
153082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15309
15310 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15311
ed50f18f
PA
153122007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15313
15314 * win32-low.c: Commit leftover changes from 2007-03-29.
15315
0c2ead7e
DJ
153162007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15317
15318 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15319 fields short instead of int. Add explicit padding.
15320 (i387_cache_to_fsave): Remove unnecessary casts.
15321 (i387_fsave_to_cache): Doc fix.
15322 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15323
73725ff3
DJ
153242007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15325
15326 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15327 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15328
d99f33d8
PA
153292007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15330
15331 * configure.srv (arm*-*-mingw32ce*): Move near the other
15332 arm targets.
15333
68070c10
PA
153342007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15335
2482afc6 15336 * configure.ac: Add errno checking.
68070c10
PA
15337 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15338 sys/file.h and malloc.h.
15339 (AC_CHECK_DECLS): Add perror.
15340 (srv_mingwce): Handle.
2482afc6 15341 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15342 win32-i386-low.o to srv_tgtobj.
15343 (i[34567]86-*-mingw*): Likewise.
15344 (arm*-*-mingw32ce*): Add case.
15345 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15346 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15347 [__MINGW32CE__] (strerror): New function.
15348 [__MINGW32CE__] (errno): Define to GetLastError.
15349 [__MINGW32CE__] (COUNTOF): New macro.
15350 (remote_open): Remove extra close call.
15351 * mem-break.c (delete_breakpoint_at): New function.
15352 * mem-break.h (delete_breakpoint_at): Declare.
15353 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15354 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15355 [USE_WIN32API] (read, write): Add char* casts.
15356 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15357 * server.h: Include wincecompat.h on Windows CE.
15358 [HAVE_ERRNO_H]: Check.
15359 (perror): Declare if not declared.
15360 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15361 (perror_with_name): Remove errno declaration.
15362 * wincecompat.h: New.
15363 * wincecompat.c: New.
15364 * win32-low.h: New.
15365 * win32-arm-low.c: New.
15366 * win32-i386-low.c: New.
15367 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15368 (OUTMSG2): Make it safe.
15369 (_T): New macro.
15370 (COUNTOF): New macro.
15371 (NUM_REGS): Get it from the low target.
15372 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15373 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15374 (thread_rec): Let low target handle debug registers.
15375 (child_add_thread): Likewise.
15376 (child_init_thread_list): Likewise.
15377 (continue_one_thread): Likewise.
15378 (regptr): New.
15379 (do_child_fetch_inferior_registers): Move to ...
15380 * win32-i386-low.c: ... here, and rename to ...
15381 (do_fetch_inferior_registers): ... this.
889bf7c5 15382 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15383 Go through the low target.
15384 (do_child_store_inferior_registers): Use regptr.
15385 (strwinerror): New function.
15386 (win32_create_inferior): Handle Windows CE.
15387 Use strwinerror instead of strerror on Windows error
15388 codes. Add program to the error output.
15389 Don't close the main thread handle on Windows CE.
15390 (win32_attach): Use coredll.dll on Windows CE.
15391 (win32_kill): Close current process and current
15392 thread handles.
15393 (win32_detach): Use coredll.dll on Windows CE.
15394 (win32_resume): Let low target handle debug registers, and
15395 step request.
15396 (handle_exception): Add/Remove initial breakpoint. Avoid
15397 non-existant WSTOPSIG on Windows CE.
15398 (win32_read_inferior_memory): Cast to remove warning.
15399 (win32_arch_string): Go through the low target.
15400 (initialize_low): Call set_breakpoint_data with the low
15401 target's breakpoint.
15402 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15403 FOP_REGNUM, mappings): Move to ...
15404 * win32-i386-low.c: ... here.
15405 * win32-low.c (win32_thread_info): Move to ...
15406 * win32-low.h: ... here.
15407 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15408 win32-arm-low.c and wincecompat.c.
15409 (all:): Add $EXEEXT.
15410 (install-only:): Likewise.
15411 (gdbserver:): Likewise.
15412 (gdbreplay:): Likewise.
15413 * config.in: Regenerate.
15414 * configure: Regenerate.
15415
41093d81
PA
154162007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15417
15418 * win32-low.c: Rename typedef thread_info to
15419 win32_thread_info throughout.
15420
544afa54
PA
154212007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15422
15423 * win32-i386-low.c: Rename to ...
15424 * win32-low.c: ... this.
15425 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15426 * Makefile.in: Likewise.
15427
bce7165d
PA
154282007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15429
15430 * remote-utils.c (monitor_output): Constify msg parameter.
15431 * server.h (monitor_output): Likewise.
15432 * win32-i386-low.c (handle_output_debug_string): New.
15433 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15434 handle_output_debug_string.
15435 (get_child_debug_event): Likewise.
15436
506c7aa0
DJ
154372007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15438
15439 * server.c (main): Correct strtoul check.
15440
42c81e2a
DJ
154412007-03-27 Jon Ringle <jon@ringle.org>
15442
15443 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15444
9453113a
DJ
154452007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15446
15447 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15448
64a69107
DJ
154492007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15450
15451 * terminal.h: Check HAVE_SGTTY_H.
15452
154532007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15454
15455 * remote-utils.c (remote_open): Print out the assigned port number.
15456
c74d0ad8
DJ
154572007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15458
15459 * remote-utils.c (monitor_output): New function.
15460 * server.c (debug_threads): Define here.
15461 (monitor_show_help): New function.
15462 (handle_query): Handle qRcmd.
15463 (main): Do not handle 'd' packet.
15464 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15465 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15466 of debug_threads.
15467
de7c3b4a
PA
154682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15469
15470 * Makefile.in (EXEEXT): New.
15471 (clean): Use $(EXEEXT).
15472
ef57601b
PA
154732007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15474
15475 * target.h (target_ops): Rename send_signal to request_interrupt,
15476 and remove enum target_signal parameter.
15477 * linux-low.c (linux_request_interrupt): Rename from
15478 linux_send_signal, and always send SIGINT.
15479 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15480 and always send SIGINT.
15481 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15482 of send_signal.
15483 (input_interrupt): Likewise.
15484
820f2bda
PA
154852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15486
15487 * server.c (get_features_xml): Check if target implemented
15488 arch_string.
15489 * win32-i386-low.c (win32_arch_string): New.
15490 (win32_target_ops): Add win32_arch_string as arch_string member.
15491
ab39bf24
UW
154922007-02-22 Markus Deuling <deuling@de.ibm.com>
15493
15494 * spu-low.c (spu_arch_string): New.
15495 (spu_target_ops): Add spu_arch_string.
15496
61ff6e04
DJ
154972007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15498
15499 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15500 * configure.ac: Do not check for terminal.h.
15501 * configure, config.in: Regenerated.
15502
fb1e4ffc
DJ
155032007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15504
15505 * Makefile.in (OBS): Add $(XML_BUILTIN).
15506 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15507 (clean): Update.
15508 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15509 (arm-with-iwmmxt.c): New.
15510 * config.in, configure: Regenerate.
15511 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15512 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15513 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15514 (arm*-*-linux*): Add iWMMXt and regset support.
15515 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15516 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15517 (arm_store_wmmxregset, target_regsets): New.
15518 * server.c (get_features_xml): Take annex argument. Check builtin
15519 XML documents.
15520 (handle_query): Handle multiple annexes.
15521
0f48aa01
DJ
155222007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15523
15524 * remote-utils.c [USE_WIN32API] (read, write): Define.
15525 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15526 write.
15527
23181151
DJ
155282007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15529
15530 * linux-i386-low.c (the_low_target): Set arch_string.
15531 * linux-x86-64-low.c (the_low_target): Likewise.
15532 * linux-low.c (linux_arch_string): New.
15533 (linux_target_ops): Add it.
15534 * linux-low.h (struct linux_target_ops): Add arch_string.
15535 * server.c (write_qxfer_response): Use const void * for DATA.
15536 (get_features_xml): New.
15537 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15538 * target.h (struct target_ops): Add arch_string method.
15539
9d606399
DJ
155402007-01-03 Denis Pilat <denis.pilat@st.com>
15541 Daniel Jacobowitz <dan@codesourcery.com>
15542
15543 * linux-low.c (linux_kill): Handle being called with no threads.
15544 * win32-i386-low.c (win32_kill): Likewise.
15545 (get_child_debug_event): Clear current_process_handle.
15546
155472006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15548 Daniel Jacobowitz <dan@codesourcery.com>
15549
15550 * remote-utils.c (remote_open): Check the type of specified
15551 serial port devices before opening them.
15552 * server.c (main): Kill the inferior if an error occurs during
15553 the first remote_open.
15554
a5e13d24
DJ
155552006-12-05 Markus Deuling <deuling@de.ibm.com>
15556
15557 * README: Update supported targets.
15558
186947f7
DJ
155592006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * Makefile.in (clean): Remove reg-mips64.c.
15562 (reg-mips64.c, reg-mips64.o): New rules.
15563 * configure.srv: Handle mips64. Include regset support for mips.
15564 * linux-mips-low.c (union mips_register): New.
15565 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15566 (mips_breakpoint, mips_breakpoint_at): Use int.
15567 (mips_collect_register, mips_supply_register)
15568 (mips_collect_register_32bit, mips_supply_register_32bit)
15569 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15570 (mips_store_fpregset, target_regsets): New.
15571 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15572
a13e2c95
UW
155732006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15574
15575 * configure.srv: Add target "spu*-*-*".
15576 * Makefile.in (clean): Remove reg-spu.c.
15577 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15578 * spu-low.c: New file.
15579
cb7283db
DJ
155802006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15581
15582 * configure.ac: Correct td_thr_tls_get_addr test.
15583 * configure: Regenerated.
15584
89be2091
DJ
155852006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15586
15587 * linux-low.c (linux_wait_for_event): Reformat. Use the
15588 pass_signals array.
15589 * remote-utils.c (decode_address_to_semicolon): New.
15590 * server.c (pass_signals, handle_general_set): New.
15591 (handle_query): Mention QPassSignals for qSupported.
15592 (main): Call handle_general_set.
15593 * server.h (pass_signals, decode_address_to_semicolon): New.
15594
000ef4f0
DJ
155952006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15596
15597 * server.c (handle_query): Correct error handling for read_auxv.
15598
b7149293
UW
155992005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15600
15601 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15602 and srv_linux_thread_db to yes.
15603 * linux-s390-low.c (s390_fill_gregset): New function.
15604 (target_regsets): Define data structure.
15605
dae5f5cf
DJ
156062006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15607
15608 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15609 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15610 * config.in, configure: Regenerated.
15611 * inferiors.c (gdb_id_to_thread): New function.
15612 (gdb_id_to_thread_id): Use it.
15613 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15614 * linux-low.h (struct process_info): Add th member.
15615 (thread_db_get_tls_address): New prototype.
15616 * remote-utils.c (decode_address): Make non-static.
15617 * server.c (handle_query): Handle qGetTLSAddr.
15618 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15619 * target.h (struct target_ops): Add get_tls_address.
15620 * thread-db.c (maybe_attach_thread): Save the thread handle.
15621 (thread_db_get_tls_address): New.
15622
32ca6d61
DJ
156232006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15624
15625 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15626 (linux_resume_one_process): Take a siginfo_t *. Update all
15627 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15628 (struct pending_signals): Add a siginfo_t.
15629 (linux_wait_for_process): Always set last_status.
15630 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15631 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15632 * linux-low.h (struct process_info): Add last_status.
15633
5ffff7c1
DJ
156342006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15635
15636 * remote-utils.c (try_rle): New function.
15637 (putpkt_binary): Use it.
15638
8695c747
DJ
156392006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15640
15641 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15642 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15643 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15644 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15645 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15646 point registers.
15647
290fadea
RS
156482006-08-08 Richard Sandiford <richard@codesourcery.com>
15649
15650 * server.c (terminal_fd): New variable.
15651 (old_foreground_pgrp): Likewise.
15652 (restore_old_foreground_pgrp): New function.
15653 (start_inferior): Record the terminal file descriptor in terminal_fd
15654 and its original foreground group in old_foreground_pgrp. Register
15655 restore_old_foreground_pgrp with atexit().
15656
9f2e1e63
DJ
156572006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15658
15659 * server.c (handle_query): Correct qPart to qXfer.
15660
b80864fb
DJ
156612006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15662
15663 * configure.ac: Check for more headers which are missing on
15664 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15665 * configure.srv: Add Cygwin and mingw32.
15666 * remote-utils.c: Don't include headers unconditionally which
15667 are missing on mingw32. Include <winsock.h> for mingw32.
15668 (remote_open): Adjust for mingw32 support. Flush
15669 standard error after writing to it.
15670 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15671 (unblock_async_io, enable_async_io, disable_async_io)
15672 (readchar, getpkt): Update for Winsock support.
15673 (prepare_resume_reply): Expect a protocol signal number.
15674 * server.c: Disable <sys/wait.h> on mingw32.
15675 (start_inferior): Adjust for mingw32 support. Flush
15676 standard error after writing to it.
15677 (attach_inferior): Likewise. Use protocol signal
15678 numbers.
15679 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15680 and names.
15681 * win32-i386-low.c: New file.
15682 * Makefile.in (XM_CLIBS): Set.
15683 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15684 (win32-i386-low.o): New dependency rule.
15685 * linux-low.c (linux_wait): Use target signal numbers.
15686 * target.h (struct target_ops): Doc fix.
15687 * server.h (target_signal_to_name): New prototype.
15688 * gdbreplay.c: Don't include headers unconditionally which
15689 are missing on mingw32. Include <winsock.h> for mingw32.
15690 (remote_close, remote_open): Adjust for Winsock support.
15691 * configure, config.in: Regenerated.
15692
0876f84a
DJ
156932006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15694
15695 * server.c (decode_xfer_read, write_qxfer_response): New.
15696 (handle_query): Take a packet length argument. Handle
15697 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15698 the qSupported response.
15699 (main): Update call to handle_query.
15700
01f9e8fa
DJ
157012006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15702
15703 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15704 (putpkt_binary): Renamed from putpkt and adjusted for binary
15705 data.
15706 (putpkt): New wrapper for putpkt_binary.
15707 (readchar): Don't mask off the high bit.
15708 (decode_X_packet): New function.
15709 * server.c (main): Call putpkt_binary if a handler sets the packet
15710 length. Save the length of the incoming packet. Handle 'X'.
15711 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15712
be2a5f71
DJ
157132006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15714
15715 * server.c (handle_query): Handle qSupported.
15716
ea025f5f
DJ
157172006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15718
15719 * remote-utils.c (all_symbols_looked_up): New variable.
15720 (look_up_one_symbol): Check it.
15721 * server.h (look_up_one_symbol): New declaration.
15722 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15723
9308fc88
DJ
157242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15727 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15728 (PTRACE_GET_THREAD_AREA): Define.
15729 (ps_get_thread_area): New function.
15730
52fb6437
NS
157312006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15732
15733 * configure.srv (m68k*-*-uclinux*): New target.
15734 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15735 (linux_resume_one_process): Remove extraneous cast.
15736 (linux_read_offsets): New.
15737 (linux_target_op): Add linux_read_offsets on mmuless systems.
15738 * server.c (handle_query): Add qOffsets logic.
15739 * target.h (struct target_ops): Add read_offsets.
15740
21b0f40c
DJ
157412006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15742
15743 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15744 (PTRACE_GET_THREAD_AREA): Define.
15745 (ps_get_thread_area): New function.
15746 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15747 (linux-x86-64-low.o): Update.
15748
0050a760
DJ
157492006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15750
15751 * configure.ac: Remove checks for prfpregset_t.
15752 * gdb_proc_service.h: New file.
15753 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15754 new "gdb_proc_service.h".
15755 * proc-service.c: Likewise.
15756 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15757 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15758 * Makefile.in (gdb_proc_service_h): Updated.
15759 * configure, config.in: Regenerated.
15760
b92a518e
DJ
157612006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15762
15763 * remote-utils.c (prepare_resume_reply): Move declaration
15764 of gdb_id_from_wait to the top of the block.
15765
545587ee
DJ
157662006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15767
15768 * linux-low.c (regsets_store_inferior_registers): Read the regset
15769 from the target before filling it.
15770
9db87ebd
DJ
157712006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15772
15773 * server.c (attach_inferior): Return SIGTRAP for a successful
15774 attach.
15775
dd24457d
DJ
157762006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15777
15778 * Makefile.in (OBS): Add version.o.
15779 (STAGESTUFF): Delete.
15780 (version.o): Add dependencies.
15781 (version.c): Replace rule.
15782 (clean): Remove version.c.
15783 * server.c (gdbserver_version): New.
15784 (gdbserver_usage): Use printf.
15785 (main): Handle --version and --help.
15786 * server.h (version, host_name): Add declarations.
15787
6f0f660e
EZ
157882005-12-23 Eli Zaretskii <eliz@gnu.org>
15789
889bf7c5
PA
15790 * linux-arm-low.c:
15791 * linux-arm-low.c:
15792 * inferiors.c:
15793 * i387-fp.h:
15794 * i387-fp.c:
15795 * gdbreplay.c:
15796 * regcache.c:
15797 * proc-service.c:
15798 * mem-break.h:
15799 * mem-break.c:
15800 * linux-x86-64-low.c:
15801 * linux-sh-low.c:
15802 * linux-s390-low.c:
15803 * linux-ppc64-low.c:
15804 * linux-ppc-low.c:
15805 * linux-mips-low.c:
15806 * linux-m68k-low.c:
15807 * linux-m32r-low.c:
15808 * linux-low.h:
15809 * linux-low.c:
15810 * linux-ia64-low.c:
15811 * linux-i386-low.c:
15812 * linux-crisv32-low.c:
15813 * thread-db.c:
15814 * terminal.h:
15815 * target.h:
15816 * target.c:
15817 * server.h:
15818 * server.c:
15819 * remote-utils.c:
15820 * regcache.h:
15821 * utils.c:
15822 * Makefile.in:
15823 * configure.ac:
6f0f660e
EZ
15824 * gdbserver.1: Add (C) after Copyright. Update the FSF
15825 address.
15826
9d1fb177
DJ
158272005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15828
15829 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15830 (arm_breakpoint_at): Recognize both breakpoints.
15831 (the_low_target): Use the correct breakpoint instruction.
15832
011a70c2
DJ
158332005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15834
15835 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15836 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15837 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15838 (the_low_target): Update.
15839
7fb85e41
AS
158402005-10-25 Andreas Schwab <schwab@suse.de>
15841
15842 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15843
15844 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15845 (ia64_num_regs): Reduce to 462.
15846
3db0444b
DJ
158472005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * acinclude.m4: Correct quoting.
15850 * aclocal.m4: Regenerated.
15851
15852 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15853 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15854 (thread_db_init): Call thread_db_err_str.
15855 * configure.ac: Check for TD_VERSION.
15856 * config.in, configure: Regenerated.
15857
bee0189a
DJ
158582005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15859
15860 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15861
e9d25b98
DJ
158622005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15863
15864 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15865 is not available. Define HAVE_PTRACE_GETREGS if it is.
15866 * config.in, configure: Regenerated.
15867 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15868 * linux-i386-low.c, linux-m68k-low.c: Update to use
15869 HAVE_PTRACE_GETREGS.
15870 * linux-low.c (regsets_fetch_inferior_registers)
15871 (regsets_store_inferior_registers): Only return 0 if we processed
15872 GENERAL_REGS.
15873 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15874 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15875
a06660f7
DJ
158762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * inferiors.c (struct thread_info): Add gdb_id.
15879 (add_thread): Add gdb_id argument.
15880 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15881 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15882 calls to add_thread.
15883 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15884 * server.c (handle_query): Use thread_to_gdb_id.
15885 (handle_v_cont, main): Use gdb_id_to_thread_id.
15886 * server.h (add_thread): Update prototype.
15887 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15888 prototypes.
15889
5a1f5858
DJ
158902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15891
15892 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15893 left-padded registers.
15894 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15895 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15896
e122f1f5
SE
158972005-07-01 Steve Ellcey <sje@cup.hp.com>
15898
15899 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15900 * configure: Regenerate.
15901 * config.in: Regenerate.
15902 * server.h (NEED_DECLARATION_STRERROR):
15903 Replace with !HAVE_DECL_STRERROR.
15904
d592fa2f
DJ
159052005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15906
15907 * linux-low.c (linux_wait, linux_send_signal): Don't test
15908 an unsigned long variable for > 0 if it could be MAX_ULONG.
15909 * server.c (myresume): Likewise.
15910 * target.c (set_desired_inferior): Likewise.
15911
ccbd4912
MK
159122005-06-13 Mark Kettenis <kettenis@gnu.org>
15913
15914 * configure.ac: Simplify and improve check for socklen_t.
15915 * configure, config.in: Regenerate.
15916
f450004a
DJ
159172005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15918
15919 * acconfig.h: Remove.
15920 * configure.ac: Add a test for socklen_t. Use three-argument
15921 AC_DEFINE throughout.
15922 * config.in: Regenerated using autoheader 2.59.
15923 * configure: Regenerated.
15924
15925 * gdbreplay.c (socklen_t): Provide a default.
15926 (remote_open): Use socklen_t.
15927 * remote-utils.c (socklen_t): Provide a default.
15928 (remote_open): Use socklen_t.
15929 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15930 unsigned char.
15931
15932 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15933 char for buffers.
15934 * linux-low.c (linux_read_memory, linux_write_memory)
15935 (linux_read_auxv): Likewise.
15936 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15937 (check_mem_write): Likewise.
15938 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15939 Likewise.
15940 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15941 (registers_from_string, register_data): Likewise.
15942 * server.c (handle_query, main): Likewise.
15943 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15944 (decode_M_packet): Likewise.
15945 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15946 * target.h (struct target_ops): Update read_memory, write_memory,
15947 and read_auxv.
15948 (read_inferior_memory, write_inferior_memory): Update.
15949 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15950 to unsigned char *.
15951 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15952 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15953 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15954 linux-s390-low.c, linux-sh-low.c: Update for changes in
15955 read_inferior_memory and the_low_target->breakpoint.
15956
eee84df1
DJ
159572005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15958
15959 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15960 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15961 * configure.srv: Add powerpc64-*-linux*.
15962 * linux-ppc64-low.c: New file.
15963
45b134e5
OF
159642005-05-23 Orjan Friberg <orjanf@axis.com>
15965
15966 * linux-cris-low.c: New file with support for CRIS.
15967 * linux-crisv32-low.c: Ditto for CRISv32.
15968 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15969 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15970 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15971 reg-crisv32.o, and reg-crisv32.c to make rules.
15972 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15973 recognized targets.
15974
48d93c75
UW
159752005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15976
15977 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15978 of sizeof (PTRACE_XFER_TYPE).
15979 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15980
e013ee27
OF
159812005-05-12 Orjan Friberg <orjanf@axis.com>
15982
889bf7c5 15983 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15984 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15985 pointers for hardware watchpoint support.
15986 * linux-low.h (struct linux_target_ops): Ditto.
15987 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15988 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15989 to linux_target_ops.
15990 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15991 reply packet.
15992 * server.c (main): Recognize 'Z' and 'z' packets.
15993
b0ded00b
UW
159942005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15995
15996 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15997 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15998 (the_low_target): Add new members.
15999
8643e2ad
DJ
160002005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16001
16002 * proc-service.c (ps_lgetregs): Search all_processes instead of
16003 all_threads.
16004
fc620387
DJ
160052005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16006
16007 * server.c (start_inferior): Change return type to int.
16008 (attach_inferior): Change sigptr to int *.
16009 (handle_v_cont, handle_v_requests): Change signal to int *.
16010 (main): Change signal to int.
16011
160122005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16013
16014 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16015 * configure.srv: Add m32r*-*-linux*.
16016 * linux-m32r-low.c: New file.
16017
e0e76420
DJ
160182005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16019
16020 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16021
a1928bad
DJ
160222005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16023
16024 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16025 Take unsigned long arguments for PIDs.
16026 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16027 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16028 (wait_for_sigstop, linux_resume_one_process)
16029 (regsets_fetch_inferior_registers, linux_send_signal)
16030 (linux_read_auxv): Likewise. Update the types of variables holding
16031 PIDs. Update format string specifiers.
16032 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16033 * remote-utils.c (prepare_resume_reply): Likewise.
16034 * server.c (cont_thread, general_thread, step_thread)
16035 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16036 unsigned long.
16037 (handle_query): Update format specifiers.
16038 (handle_v_cont, main): Use strtoul for thread IDs.
16039 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16040 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16041 (general_thread, step_thread, thread_from_wait)
16042 (old_thread_from_wait): Update.
16043 * target.h (struct thread_resume): Use unsigned long for THREAD.
16044 (struct target_ops): Use unsigned long for arguments to attach and
16045 thread_alive.
16046
dcdb98d2
DJ
160472005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16048
16049 * acinclude.m4: Include bfd/bfd.m4 directly.
16050 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16051 <agriffis@toolchain.org>.
16052 * aclocal.m4, configure: Regenerated.
16053
bec39cab
AC
160542005-01-07 Andrew Cagney <cagney@gnu.org>
16055
16056 * configure.ac: Rename configure.in, require autoconf 2.59.
16057 * configure: Re-generate.
16058
434c4c77
DJ
160592004-12-08 Daniel Jacobowitz <dan@debian.org>
16060
16061 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16062 LIBS when finished.
16063 * aclocal.m4: Regenerated.
16064 * configure: Regenerated.
16065
db1d3e1b
AS
160662004-11-21 Andreas Schwab <schwab@suse.de>
16067
16068 * linux-m68k-low.c (m68k_num_gregs): Define.
16069 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16070 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16071 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16072 (m68k_breakpoint_at): New. Add to the_low_target.
16073
16074 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16075 srv_linux_thread_db to yes.
16076
43360365
JB
160772004-10-20 Joel Brobecker <brobecker@gnat.com>
16078
16079 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16080 (ARCH_SET_FS): Likewise.
16081 (ARCH_GET_FS): Likewise.
16082 (ARCH_GET_GS): Likewise.
16083
fd500816
DJ
160842004-10-16 Daniel Jacobowitz <dan@debian.org>
16085
16086 * linux-i386-low.c (ps_get_thread_area): New.
16087 * linux-x86-64-low.c (ps_get_thread_area): New.
16088 * linux-low.c: Include <sys/syscall.h>.
16089 (linux_kill_one_process): Don't kill the first thread here.
16090 (linux_kill): Kill the first thread here.
16091 (kill_lwp): New function.
16092 (send_sigstop, linux_send_signal): Use it.
16093 * proc-service.c: Clean up #ifdefs.
16094 (fpregset_info): Delete.
16095 (ps_lgetregs): Update and enable implementation.
16096 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16097 implementations.
16098 * remote-utils.c (struct sym_cache, symbol_cache): New.
16099 (input_interrupt): Print a clearer message.
16100 (async_io_enabled): New variable.
16101 (enable_async_io, disable_async_io): Use it. Update comments.
16102 (look_up_one_symbol): Use the symbol cache.
16103 * thread-db.c (thread_db_look_up_symbols): New function.
16104 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16105
f6de3c42
DJ
161062004-10-16 Daniel Jacobowitz <dan@debian.org>
16107
16108 * configure.in: Test for -rdynamic.
16109 * configure: Regenerated.
16110 * Makefile (INTERNAL_LDFLAGS): New.
16111 (gdbserver, gdbreplay): Use it.
16112
2c0fc042
AC
161132004-09-02 Andrew Cagney <cagney@gnu.org>
16114
16115 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16116
075b3282
DJ
161172004-03-23 Daniel Jacobowitz <drow@mvista.com>
16118
16119 * linux-low.c (linux_wait): Clear all_processes list also.
16120
fa6a77dc
DJ
161212004-03-12 Daniel Jacobowitz <drow@mvista.com>
16122
16123 * linux-low.c: Include <errno.h>. Remove extern declaration of
16124 errno.
16125
6d782a97
DJ
161262004-03-12 Daniel Jacobowitz <drow@mvista.com>
16127
16128 * gdbreplay.c, server.h, utils.c: Update copyright years.
16129
3a7fb99b
DJ
161302004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16131
16132 * server.c (main): Print child status or termination signal from
16133 variable 'signal', not 'sig'.
16134
c3e735a6
DJ
161352004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16136
16137 * linux-low.c (linux_read_memory): Change return type to
16138 int. Check for and return error from ptrace().
16139 * target.c (read_inferior_memory): Change return type to int. Pass
16140 back return status from the_target->read_memory().
16141 * target.h (struct target_ops): Adapt *read_memory() prototype.
16142 Update comment.
16143 (read_inferior_memory): Adapt prototype.
16144 * server.c (main): Return an error packet if
16145 read_inferior_memory() returns an error.
16146
a59d1c82
DJ
161472004-03-04 Daniel Jacobowitz <drow@mvista.com>
16148
16149 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16150 Unify with other clean targets.
16151
dc3f8883
DJ
161522004-02-29 Daniel Jacobowitz <drow@mvista.com>
16153
16154 * server.c (handle_v_cont): Call set_desired_inferior.
16155
89a208da
DJ
161562004-02-29 Daniel Jacobowitz <drow@mvista.com>
16157
16158 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16159
62ea82f5
DJ
161602004-02-29 Daniel Jacobowitz <drow@mvista.com>
16161
16162 * linux-low.c (linux_wait): Unblock async I/O.
16163 (linux_resume): Block and enable async I/O.
16164 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16165 * server.h (block_async_io, unblock_async_io): Add prototypes.
16166
6910d122
DJ
161672004-02-29 Daniel Jacobowitz <drow@mvista.com>
16168
16169 * remote-utils.c (remote_open): Print a status notice after
16170 opening a TCP port.
16171 * server.c (attach_inferior): Print a status notice after
16172 attaching.
16173
161742004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16175
16176 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16177
c89dc5d4
DJ
161782004-02-26 Daniel Jacobowitz <drow@mvista.com>
16179
16180 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16181 error packet.
16182 * server.c, target.h: Update copyright years.
16183
4b8dad4a
RM
161842004-02-25 Roland McGrath <roland@redhat.com>
16185
16186 * target.h (struct target_ops): New member `read_auxv'.
16187 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16188 * linux-low.c (linux_read_auxv): New function.
16189 (linux_target_ops): Initialize `read_auxv' member to that.
16190
d7446758
JB
161912004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16192
16193 Committed by Jim Blandy <jimb@redhat.com>.
16194
16195 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16196 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16197 instead of GPR_SIZE to distiguish s390 and s390x targets.
16198
5544ad89
DJ
161992004-01-31 Daniel Jacobowitz <drow@mvista.com>
16200
16201 * linux-low.c: Update copyright year.
16202 (check_removed_breakpoint): Clear pending_is_breakpoint.
16203 (linux_set_resume_request, linux_queue_one_thread)
16204 (resume_status_pending_p): New functions.
16205 (linux_continue_one_thread): Use process->resume.
16206 (linux_resume): Only resume threads if there are no pending events.
16207 * linux-low.h (struct process_info): Add resume request
16208 pointer.
16209
2a68b70e
DJ
162102004-01-30 Daniel Jacobowitz <drow@mvista.com>
16211
16212 * regcache.c (new_register_cache): Clear the allocated register
16213 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16214
64386c31
DJ
162152003-10-13 Daniel Jacobowitz <drow@mvista.com>
16216
16217 * linux-low.c (linux_resume): Take a struct thread_resume *
16218 argument.
16219 (linux_wait): Update call.
16220 (resume_ptr): New static variable.
16221 (linux_continue_one_thread): Renamed from
16222 linux_continue_one_process. Use resume_ptr.
16223 (linux_resume): Use linux_continue_one_thread.
16224 * server.c (handle_v_cont, handle_v_requests): New functions.
16225 (myresume): New function.
16226 (main): Handle 'v' case.
16227 * target.h (struct thread_resume): New type.
16228 (struct target_ops): Change argument of "resume" to struct
16229 thread_resume *.
16230 (myresume): Delete macro.
16231
c938e9b0
L
162322003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16233
16234 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16235 (uninstall): Support DESTDIR.
16236
7f313d07
BC
16237Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16238
16239 * configure.srv: Add xscale*linux copy of arm*linux entry.
16240
3b2fc2ea
DJ
162412003-07-24 Daniel Jacobowitz <drow@mvista.com>
16242
16243 * linux-arm-low.c (arm_reinsert_addr): New function.
16244 (the_low_target): Add arm_reinsert_addr.
16245
1c0a559e
MK
162462003-07-08 Mark Kettenis <kettenis@gnu.org>
16247
16248 * mem-break.c: Remove whitespace at end of file.
16249
43d5792c
DJ
162502003-06-28 Daniel Jacobowitz <drow@mvista.com>
16251
16252 * configure.in: Check whether we need to prototype strerror.
16253 * server.h: Optionally prototype strerror.
16254 * gdbreplay.c (perror_with_name): Use strerror.
16255 * linux-low.c (linux_attach_lwp): Use strerror.
16256 * utils.c (perror_with_name): Use strerror.
16257 * config.in, configure: Regenerated.
16258
c8a86edf
DJ
162592003-06-28 Daniel Jacobowitz <drow@mvista.com>
16260
16261 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16262 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16263
73d37363
DJ
162642003-06-20 Daniel Jacobowitz <drow@mvista.com>
16265
16266 * Makefile.in (SFILES): Update.
16267 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16268 low-sun3.c: Remove files.
16269
6ad8ae5c
DJ
162702003-06-17 Daniel Jacobowitz <drow@mvista.com>
16271
16272 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16273 (linux_detach_one_process, linux_detach): New functions.
16274 (linux_target_ops): Add linux_detach.
16275 * server.c (main): Handle 'D' packet.
16276 * target.h (struct target_ops): Add "detach" member.
16277 (detach_inferior): Define.
16278
1581182a
MK
162792003-06-13 Mark Kettenis <kettenis@gnu.org>
16280
16281 From Kelley Cook <kelleycook@wideopenwest.com>:
16282 * configure.srv: Accept i[34567]86 variants.
16283
e5379b03
DJ
162842003-06-05 Daniel Jacobowitz <drow@mvista.com>
16285
16286 * linux-low.c (linux_wait_for_event): Correct comment typos.
16287 (linux_resume_one_process): Call check_removed_breakpoint.
16288 (linux_send_signal): New function.
16289 (linux_target_ops): Add linux_send_signal.
16290 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16291 of kill.
16292 * target.h (struct target_ops): Add send_signal.
16293
2ff29de4
JB
162942003-05-29 Jim Blandy <jimb@redhat.com>
16295
16296 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16297 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16298 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16299 away part of the register's value.
16300
254787d4
DJ
163012003-03-26 Daniel Jacobowitz <drow@mvista.com>
16302
16303 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16304 (linux_wait_for_event, linux_init_signals): Likewise.
16305
94e10508
DJ
163062003-03-17 Daniel Jacobowitz <drow@mvista.com>
16307
16308 * configure.in: Check for stdlib.h.
16309 * configure: Regenerated.
16310 * config.in: Regenerated.
16311
4c0711e0
DJ
163122003-01-04 Andreas Schwab <schwab@suse.de>
16313
16314 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16315
ef66e766
AC
163162003-01-02 Andrew Cagney <ac131313@redhat.com>
16317
16318 * Makefile.in: Remove obsolete code.
16319
a1358604
DJ
163202002-11-20 Daniel Jacobowitz <drow@mvista.com>
16321
16322 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16323 defined(PT_FPR0_HI).
16324
23ce3b1c
DJ
163252002-11-17 Stuart Hughes <seh@zee2.com>
16326
16327 * linux-arm-low.c (arm_num_regs): Increase.
16328 (arm_regmap): Include status register.
16329
163302002-11-17 Daniel Jacobowitz <drow@mvista.com>
16331
16332 * linux-low.c (register_addr): Remove incorrect -1 check.
16333
a9fa9f7d
DJ
163342002-08-29 Daniel Jacobowitz <drow@mvista.com>
16335
16336 * linux-low.c (linux_create_inferior): Call setpgid. Return
16337 the new PID.
16338 (unstopped_p, linux_signal_pid): Remove.
16339 (linux_target_ops): Remove linux_signal_pid.
16340 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16341 global instead of target method.
16342 * target.h (struct target_ops): Remove signal_pid. Update comment
16343 for create_inferior.
16344 * server.c (signal_pid): New variable.
16345 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16346 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16347 (attach_inferior): Set signal_pid.
16348
17574093
DJ
163492002-08-23 Daniel Jacobowitz <drow@mvista.com>
16350
16351 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16352
163532002-08-20 Jim Blandy <jimb@redhat.com>
16354
16355 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16356 default for this.
16357
163582002-08-01 Andrew Cagney <cagney@redhat.com>
16359
16360 * Makefile.in: Make chill references obsolete.
16361
163622002-07-24 Kevin Buettner <kevinb@redhat.com>
16363
16364 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16365 * configure: Regenerate.
16366 * config.in: Regenerate.
16367
163682002-07-09 David O'Brien <obrien@FreeBSD.org>
16369
16370 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16371 (perror_with_name, remote_close, remote_open, expect, play): Static.
16372
163732002-07-04 Michal Ludvig <mludvig@suse.cz>
16374
4b8dad4a 16375 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16376 byte offsets instead of an array of indexes.
16377 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16378
163792002-06-13 Daniel Jacobowitz <drow@mvista.com>
16380
16381 * regcache.c: Add comment.
16382
163832002-06-11 Daniel Jacobowitz <drow@mvista.com>
16384
16385 * thread-db.c: New file.
16386 * proc-service.c: New file.
16387 * acinclude.m4: New file.
16388 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16389 proc-service.o, and thread-db.o.
16390 (linux-low.o): Add USE_THREAD_DB.
16391 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16392 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16393 * aclocal.m4: Regenerated.
16394 * config.in: Regenerated.
16395 * configure: Regenerated.
16396 * configure.in: Check for proc_service.h, sys/procfs.h,
16397 thread_db.h, and linux/elf.h headrs.
16398 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16399 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16400 Check for -lthread_db and thread support.
16401 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16402 PowerPC, and SuperH.
16403 * i387-fp.c: Constify arguments.
16404 * i387-fp.h: Likewise.
16405 * inferiors.c: (struct thread_info): Renamed from
16406 `struct inferior_info'. Remove PID member. Use generic inferior
16407 list header. All uses updated.
16408 (inferiors, signal_pid): Removed.
16409 (all_threads): New variable.
16410 (get_thread): Define.
16411 (add_inferior_to_list): New function.
16412 (for_each_inferior): New function.
16413 (change_inferior_id): New function.
16414 (add_inferior): Removed.
16415 (remove_inferior): New function.
16416 (add_thread): New function.
16417 (free_one_thread): New function.
16418 (remove_thread): New function.
16419 (clear_inferiors): Use for_each_inferior and free_one_thread.
16420 (find_inferior): New function.
16421 (find_inferior_id): New function.
16422 (inferior_target_data): Update argument type.
16423 (set_inferior_target_data): Likewise.
16424 (inferior_regcache_data): Likewise.
16425 (set_inferior_regcache_data): Likewise.
16426 * linux-low.c (linux_bp_reinsert): Remove.
16427 (all_processes, stopping_threads, using_thrads)
16428 (struct pending_signals, debug_threads, pid_of): New.
16429 (inferior_pid): Replace with macro.
16430 (struct inferior_linux_data): Remove.
16431 (get_stop_pc, add_process): New functions.
16432 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16433 Use add_process and add_thread.
16434 (linux_attach_lwp): New function, based on old linux_attach. Use
16435 add_process and add_thread. Set stop_expected for new threads.
16436 (linux_attach): New function.
16437 (linux_kill_one_process): New function.
16438 (linux_kill): Kill all LWPs.
16439 (linux_thread_alive): Use find_inferior_id.
16440 (check_removed_breakpoints, status_pending_p): New functions.
16441 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16442 Update. Use WNOHANG. Wait for cloned processes also. Update process
16443 struct for the found process.
16444 (linux_wait_for_event): New function.
16445 (linux_wait): Use it. Support LWPs.
16446 (send_sigstop, wait_for_sigstop, stop_all_processes)
16447 (linux_resume_one_process, linux_continue_one_process): New functions.
16448 (linux_resume): Support LWPs.
16449 (REGISTER_RAW_SIZE): Remove.
16450 (fetch_register): Use register_size instead. Call supply_register.
16451 (usr_store_inferior_registers): Likewise. Call collect_register.
16452 Fix recursive case.
16453 (regsets_fetch_inferior_registers): Improve error message.
16454 (regsets_store_inferior_registers): Add debugging.
16455 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16456 (unstopped_p, linux_signal_pid): New functions.
16457 (linux_target_ops): Add linux_signal_pid.
16458 (linux_init_signals): New function.
16459 (initialize_low): Call it. Initialize using_threads.
16460 * regcache.c (inferior_regcache_data): Add valid
16461 flag.
16462 (get_regcache): Fetch registers lazily. Add fetch argument
16463 and update all callers.
16464 (regcache_invalidate_one, regcache_invalidate): New
16465 functions.
16466 (new_register_cache): Renamed from create_register_cache.
16467 Return the new regcache.
16468 (free_register_cache): Change argument to a void *.
16469 (registers_to_string, registers_from_string): Call get_regcache
16470 with fetch flag set.
16471 (register_data): Make static. Pass fetch flag to get_regcache.
16472 (supply_register): Call get_regcache with fetch flag clear.
16473 (collect_register): Call get_regcache with fetch flag set.
16474 (collect_register_as_string): New function.
16475 * regcache.h: Update.
16476 * remote-utils.c (putpkt): Flush after debug output and use
16477 stderr.
16478 Handle input interrupts while waiting for an ACK.
16479 (input_interrupt): Use signal_pid method.
16480 (getpkt): Flush after debug output and use stderr.
16481 (outreg): Use collect_register_as_string.
16482 (new_thread_notify, dead_thread_notify): New functions.
16483 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16484 and general_thread.
16485 (look_up_one_symbol): Flush after debug output.
16486 * server.c (step_thread, server_waiting): New variables.
16487 (start_inferior): Don't use signal_pid. Update call to mywait.
16488 (attach_inferior): Update call to mywait.
16489 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16490 (main): Don't fetch/store registers explicitly. Use
16491 set_desired_inferior. Support proposed ``Hs'' packet. Update
16492 calls to mywait.
16493 * server.h: Update.
16494 (struct inferior_list, struct_inferior_list_entry): New.
16495 * target.c (set_desired_inferior): New.
16496 (write_inferior_memory): Constify.
16497 (mywait): New function.
16498 * target.h: Update.
16499 (struct target_ops): New signal_pid method.
16500 (mywait): Removed macro, added prototype.
16501
16502 * linux-low.h (regset_func): Removed.
16503 (regset_fill_func, regset_store_func): New.
16504 (enum regset_type): New.
16505 (struct regset_info): Add type field. Use new operation types.
16506 (struct linux_target_ops): stop_pc renamed to get_pc.
16507 Add decr_pc_after_break and breakpoint_at.
16508 (get_process, get_thread_proess, get_process_thread)
16509 (strut process_info, all_processes, linux_attach_lwp)
16510 (thread_db_init): New.
16511
16512 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16513 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16514 (the_low_target): Add new members.
16515 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16516 (i386_store_fpxregset): Constify.
16517 (target_regsets): Add new kind identifier.
16518 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16519 (i386_set_pc): Add debugging.
16520 (i386_breakpoint_at): New function.
16521 (the_low_target): Add new members.
16522 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16523 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16524 (mips_breakpoint_at): New.
16525 (the_low_target): Add new members.
16526 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16527 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16528 (the_low_target): Add new members.
16529 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16530 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16531 (the_low_target): Add new members.
16532 * linux-x86-64-low.c (target_regsets): Add new kind
16533 identifier.
16534
165352002-05-15 Daniel Jacobowitz <drow@mvista.com>
16536
16537 From Martin Pool <mbp@samba.org>:
16538 * server.c (gdbserver_usage): New function.
16539 (main): Call it.
16540
165412002-05-14 Daniel Jacobowitz <drow@mvista.com>
16542
16543 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16544 stop_at -> stop_pc.
16545
165462002-05-04 Andrew Cagney <ac131313@redhat.com>
16547
16548 * Makefile.in: Remove obsolete code.
16549
165502002-04-24 Michal Ludvig <mludvig@suse.cz>
16551
16552 * linux-low.c (regsets_fetch_inferior_registers),
16553 (regsets_store_inferior_registers): Removed cast to int from
16554 ptrace() calls.
16555 * regcache.h: Added declaration of struct inferior_info.
16556
165572002-04-20 Daniel Jacobowitz <drow@mvista.com>
16558
16559 * inferiors.c (struct inferior_info): Add regcache_data.
16560 (add_inferior): Call create_register_cache.
16561 (clear_inferiors): Call free_register_cache.
16562 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16563 * regcache.c (struct inferior_regcache_data): New.
16564 (registers): Remove.
16565 (get_regcache): New function.
16566 (create_register_cache, free_register_cache): New functions.
16567 (set_register_cache): Don't initialize the register cache here.
16568 (registers_to_string, registers_from_string, register_data): Call
16569 get_regcache.
16570 * regcache.h: Add prototypes.
16571 * server.h: Likewise.
16572
165732002-04-20 Daniel Jacobowitz <drow@mvista.com>
16574
16575 * mem-break.c: New file.
16576 * mem-break.h: New file.
16577 * Makefile.in: Add mem-break.o rule; update server.h
16578 dependencies.
16579 * inferiors.c (struct inferior_info): Add target_data
16580 member.
16581 (clear_inferiors): Free target_data member if set.
16582 (inferior_target_data, set_inferior_target_data): New functions.
16583 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16584 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16585 * linux-low.c (linux_bp_reinsert): New variable.
16586 (struct inferior_linux_data): New.
16587 (linux_create_inferior): Use set_inferior_target_data.
16588 (linux_attach): Likewise. Call add_inferior.
16589 (linux_wait_for_one_inferior): New function.
16590 (linux_wait): Call it.
16591 (linux_write_memory): Add const.
16592 (initialize_low): Call set_breakpoint_data.
16593 * linux-low.h (struct linux_target_ops): Add breakpoint
16594 handling members.
16595 * server.c (attach_inferior): Remove extra add_inferior
16596 call.
16597 * server.h: Include mem-break.h. Update inferior.c
16598 prototypes.
16599 * target.c (read_inferior_memory)
16600 (write_inferior_memory): New functions.
16601 * target.h (read_inferior_memory)
16602 (write_inferior_memory): Change macros to prototypes.
16603 (struct target_ops): Update comments. Add const to write_memory
16604 definition.
16605
166062002-04-11 Daniel Jacobowitz <drow@mvista.com>
16607
16608 * linux-low.c (usr_store_inferior_registers): Support
16609 registers which are allowed to fail to store.
16610 * linux-low.h (linux_target_ops): Likewise.
16611 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16612 (ppc_cannot_store_register): FPSCR may not be storable.
16613
166142002-04-09 Daniel Jacobowitz <drow@mvista.com>
16615
16616 * server.h: Include <string.h> if HAVE_STRING_H.
16617 * ChangeLog: Correct paths in last ChangeLog entry.
16618
166192002-04-09 Daniel Jacobowitz <drow@mvista.com>
16620
16621 * linux-low.h: Remove obsolete prototypes.
16622 (struct linux_target_ops): New.
16623 (extern the_low_target): New.
16624 * linux-low.c (num_regs, regmap): Remove declarations.
16625 (register_addr): Use the_low_target explicitly.
16626 (fetch_register): Likewise.
16627 (usr_fetch_inferior_registers): Likewise.
16628 (usr_store_inferior_registers): Likewise.
16629 * linux-arm-low.c (num_regs): Remove.
16630 (arm_num_regs): Define.
16631 (arm_regmap): Renamed from regmap, made static.
16632 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16633 made static.
16634 (arm_cannot_store_register): Renamed from cannot_store_register,
16635 made static.
16636 (the_low_target): New.
16637 * linux-i386-low.c (num_regs): Remove.
16638 (i386_num_regs): Define.
16639 (i386_regmap): Renamed from regmap, made static.
16640 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16641 made static.
16642 (i386_cannot_store_register): Renamed from cannot_store_register,
16643 made static.
16644 (the_low_target): New.
16645 * linux-ia64-low.c (num_regs): Remove.
16646 (ia64_num_regs): Define.
16647 (ia64_regmap): Renamed from regmap, made static.
16648 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16649 made static.
16650 (ia64_cannot_store_register): Renamed from cannot_store_register,
16651 made static.
16652 (the_low_target): New.
16653 * linux-m68k-low.c (num_regs): Remove.
16654 (m68k_num_regs): Define.
16655 (m68k_regmap): Renamed from regmap, made static.
16656 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16657 made static.
16658 (m68k_cannot_store_register): Renamed from cannot_store_register,
16659 made static.
16660 (the_low_target): New.
16661 * linux-mips-low.c (num_regs): Remove.
16662 (mips_num_regs): Define.
16663 (mips_regmap): Renamed from regmap, made static.
16664 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16665 made static.
16666 (mips_cannot_store_register): Renamed from cannot_store_register,
16667 made static.
16668 (the_low_target): New.
16669 * linux-ppc-low.c (num_regs): Remove.
16670 (ppc_num_regs): Define.
16671 (ppc_regmap): Renamed from regmap, made static.
16672 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16673 made static.
16674 (ppc_cannot_store_register): Renamed from cannot_store_register,
16675 made static.
16676 (the_low_target): New.
16677 * linux-s390-low.c (num_regs): Remove.
16678 (s390_num_regs): Define.
16679 (s390_regmap): Renamed from regmap, made static.
16680 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16681 made static.
16682 (s390_cannot_store_register): Renamed from cannot_store_register,
16683 made static.
16684 (the_low_target): New.
16685 * linux-sh-low.c (num_regs): Remove.
16686 (sh_num_regs): Define.
16687 (sh_regmap): Renamed from regmap, made static.
16688 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16689 made static.
16690 (sh_cannot_store_register): Renamed from cannot_store_register,
16691 made static.
16692 (the_low_target): New.
16693 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16694 (the_low_target): New.
16695
166962002-04-09 Daniel Jacobowitz <drow@mvista.com>
16697
16698 * Makefile.in: Add stamp-h target.
16699 * configure.in: Create stamp-h.
16700 * configure: Regenerated.
16701
167022002-04-09 Daniel Jacobowitz <drow@mvista.com>
16703
16704 * inferiors.c: New file.
16705 * target.c: New file.
16706 * target.h: New file.
16707 * Makefile.in: Add target.o and inferiors.o. Update
16708 dependencies.
16709 * linux-low.c (inferior_pid): New static variable,
16710 moved from server.c.
16711 (linux_create_inferior): Renamed from create_inferior.
16712 Call add_inferior. Return 0 on success instead of a PID.
16713 (linux_attach): Renamed from myattach.
16714 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16715 (linux_thread_alive): Renamed from mythread_alive.
16716 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16717 child dies.
16718 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16719 (regsets_store_inferior_registers): Correct error message.
16720 Add missing ``return 0''.
16721 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16722 (linux_store_registers): Renamed from store_inferior_registers.
16723 (linux_read_memory): Renamed from read_inferior_memory.
16724 (linux_write_memory): Renamed from write_inferior_memory.
16725 (linux_target_ops): New structure.
16726 (initialize_low): Call set_target_ops ().
16727 * remote-utils.c (unhexify): New function.
16728 (hexify): New function.
16729 (input_interrupt): Send signals to ``signal_pid''.
16730 * server.c (inferior_pid): Remove.
16731 (start_inferior): Update create_inferior call.
16732 (attach_inferior): Call add_inferior.
16733 (handle_query): New function.
16734 (main): Call handle_query for `q' packets.
16735 * server.h: Include "target.h". Remove obsolete prototypes.
16736 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16737
167382002-04-09 Daniel Jacobowitz <drow@mvista.com>
16739
16740 * Makefile.in: Add WARN_CFLAGS. Update configury
16741 dependencies.
16742 * configure.in: Check for <string.h>
16743 * configure: Regenerate.
16744 * config.in: Regenerate.
16745 * gdbreplay.c: Include needed system headers.
16746 (remote_open): Remove strchr prototype.
16747 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16748 * regcache.c (supply_register): Change buf argument to const void *.
16749 (supply_register_by_name): Likewise.
16750 (collect_register): Change buf argument to void *.
16751 (collect_register_by_name): Likewise.
16752 * regcache.h: Add missing prototypes.
16753 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16754 * server.c (handle_query): New function.
16755 (attached): New static variable, moved out of main.
16756 (main): Quiet longjmp clobber warnings.
16757 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16758 * utils.c (error): Remove NORETURN.
16759 (fatal): Likewise.