This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] dwarf2read.c: C++fy lnp_state_machine
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 04 Apr 2017 17:21:55 -0400
- Subject: [binutils-gdb] dwarf2read.c: C++fy lnp_state_machine
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 6f77053d2ae56f16c10a8817732ed9fb43893507 ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 6f77053d2ae56f16c10a8817732ed9fb43893507
dwarf2read.c: C++fy lnp_state_machine
While I was looking at the file, I noticed that this struct could be
nicely converted to a class. As I was progressing, I ended up moving
all state machine actual internal state manipulation to methods of
lnp_state_machine, essentially decoupling DWARF parsing from state
tracking. I also noticed that the lnp_reader_state doesn't really
serve any good use, so that's eliminated in the process.
gdb/ChangeLog:
2017-04-04 Pedro Alves <palves@redhat.com>
* dwarf2read.c (lnp_state_machine): Now a class. Initialize all
data fields, make them private and add "m_" prefixes.
(lnp_state_machine::lnp_state_machine): New ctor.
(record_line, check_line_address, handle_set_discriminator)
(handle_set_address, handle_advance_pc, handle_special_opcode)
(handle_advance_line, handle_set_file, handle_negate_stmt)
(handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
(end_sequence, advance_line): New methods.
(m_gdbarch, m_record_lines_p): New fields.
(lnp_reader_state): Delete.
(dwarf_record_line): Rename to ...
(lnp_state_machine::record_line): ... adjust.
(init_lnp_state_machine): Delete.
(lnp_state_machine::lnp_state_machine): New.
(check_line_address): Rename to ...
(lnp_state_machine::check_line_address): This.
(dwarf_decode_lines_1): Remove reference to "reader_state".
Adjust lnp_state_machine having a non-default ctor. Use bool.
State machine internal state manipulation moved to
lnp_state_machine methods.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch64-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-native-gdbserver-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-cc-with-index, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-native-gdbserver-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-m32, branch master *** BREAKAGE ***