diff options
author | Pedro Alves <palves@redhat.com> | 2017-04-04 20:03:26 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-04-04 20:03:26 +0100 |
commit | 6f77053d2ae56f16c10a8817732ed9fb43893507 (patch) | |
tree | b9374d6e2ed5e19c99322b683cfe868dd6dd1e0f /gdb/nbsd-nat.c | |
parent | 9c5417255690af00751c7d506172459afe856894 (diff) | |
download | gdb-6f77053d2ae56f16c10a8817732ed9fb43893507.zip gdb-6f77053d2ae56f16c10a8817732ed9fb43893507.tar.gz gdb-6f77053d2ae56f16c10a8817732ed9fb43893507.tar.bz2 |
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.
Diffstat (limited to 'gdb/nbsd-nat.c')
0 files changed, 0 insertions, 0 deletions