aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-08-14 14:50:48 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-10-23 10:57:13 +0100
commit790e2a12487890559d692d60bdaefaef9b9b45b1 (patch)
tree6599b3ad35d4564009d20029a6b543258f175236 /gdb/language.h
parentb01175fc46bbb9103bde88ec93236bcb6719c696 (diff)
downloadgdb-790e2a12487890559d692d60bdaefaef9b9b45b1.zip
gdb-790e2a12487890559d692d60bdaefaef9b9b45b1.tar.gz
gdb-790e2a12487890559d692d60bdaefaef9b9b45b1.tar.bz2
gdb: move Modula2 language class into a header file
Move the m2_language class from m2-lang.c into m2-lang.h. The benefit of this move is that we can remove trampoline functions. Currently the language implementation is split of different m2-* files with m2-lang.h including declaration for all the language implementation functions. Currently the m2_language class in m2-lang.c has member functions that then call the global functions declared in m2-lang.h. After this change the m2_language class is declared in m2-lang.h, and the member functions are the implementations defined in all the m2-* files. There should be no user visible changes after this commit. gdb/ChangeLog: * m2-exp.y (m2_parse): Rename to... (m2_language::parser): ...this. Update function signature. * m2-lang.c (m2_printchar): Renamed to m2_language::printchar. (m2_op_print): Rename to... (m2_language::op_print_tab): ...this, and make const. (exp_descriptor_modula2): Rename to... (m2_language::exp_descriptor_modula2): ...this. (class m2_language): Move to m2-lang.h. (m2_language::language_arch_info): New function, moved out of class declaration. (m2_language::printchar): New function, body from m2_printchar. (m2_language::printstr): New function, moved out of class declaration. (m2_language::emitchar): Likewise. * m2-lang.h (m2_parse): Delete declaration. (m2_print_typedef): Delete declaration. (m2_value_print_inner): Delete declaration. (class m2_language): Class declaration moved from m2-lang.c, larger functions are left in m2-lang.c. * m2-typeprint.c (m2_print_typedef): Rename to... (m2_language::print_typedef): ...this, and update function signature. * m2-valprint.c (m2_value_print_inner): Rename to... (m2_language::value_print_inner): ...this, replace use of LA_PRINT_STRING with a direct call to printstr member function, and update recursive call.
Diffstat (limited to 'gdb/language.h')
0 files changed, 0 insertions, 0 deletions