summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.h
Commit message (Collapse)AuthorAgeFilesLines
* Move headers to include/wabt/ (#1998)Alex Reinking2022-09-281-98/+0
| | | This makes things easier for users and packagers of libwabt.
* wasm-objdump: Improve disassembly of call_indirect (#1866)Sam Clegg2022-03-161-0/+1
| | | | | | | Use the text format convention of putting the table before the type. Also track type names so they can be reported along with the table name, if available. Fixes: #1865
* Use C++17 string_view (#1826)Sam Clegg2022-02-111-4/+4
| | | | | Now that we have C++17 we don't need our own string_view class anymore. Depends on #1825
* wasm-objdump: Print local names during disassembly (#1818)Michael Williamson2022-02-021-0/+8
| | | Fixes #1815
* objdump: Consider params when printing local decl index (#1819)Michael Williamson2022-02-011-0/+1
|
* Add objdump flag to print section offsets instead of file offsets (#1696)Derek Schuff2021-08-051-0/+1
| | | Currently implemented just for disassembly. It could be added for other sections/functionality in the future.
* [EH] Replace event with tag (#1678)Heejin Ahn2021-06-221-1/+1
| | | | | | | | | | | We recently decided to change 'event' to 'tag', and 'event section' to 'tag section', out of the rationale that the section contains a generalized tag that references a type, which may be used for something other than exceptions, and the name 'event' can be confusing in the web context. See - https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130 - https://github.com/WebAssembly/exception-handling/pull/161
* Add --relocatable support for tables (#1549) (#1549)Andy Wingo2020-10-011-0/+1
| | | | | | | | | | | | | We add relocations for table numbers on each place where we reify a table number (call_indirect, table.get, table.set...), but only if reference types are enabled. Also, fix symbol table generation with unnamed definitions, to allow for relocating references to anonymous functions or tables. As tests, add variants of the relocations and symbol-tables dump tests, with and without all features enabled. Enabling reference types causes relocs to be emitted. We also add --details to the relocations dump tests, so that we can see the target symbols for the relocations.
* Fix integer overflow in objdump name tracking (#1524)Sam Clegg2020-08-191-3/+2
| | | | Fixes: #1520
* Refactor objdump name handling a little (#1030)Ben Smith2019-03-031-5/+13
| | | | Use `ObjdumpNames` struct to share similar code for mapping indexes to names.
* [wasm-objdump] Show data segment names (#1028)Sam Clegg2019-03-031-0/+1
|
* Improve support for event symbols and except_ref types (#1025)Wouter van Oortmerssen2019-02-241-0/+1
| | | | | | * Added except_ref to be legal in a block type signature * Added more support for event symbols.
* Add support for new relocation types used in DWARF sections (#846)Sam Clegg2018-05-291-0/+1
|
* Generate symbol table when creating relocations in binary-writer.cc (#794)Sam Clegg2018-03-061-0/+7
|
* Add support for new symbol table format (#769)Sam Clegg2018-03-051-0/+1
|
* Enable all reader features in objdump (#628)Sam Clegg2017-09-141-1/+0
| | | | | Objdump should really make a best effort to display anything its given. There are other tools that are better suited for validation.
* Always include quoted headers like "src/foo.h" (#601)Ben Smith2017-08-301-3/+3
| | | This way the names won't conflict with other headers with the same name.
* Add saturating float truncation operators (#573)Ben Smith2017-08-161-1/+2
| | | | | | | | | | | | Add saturating truncation operators as described here: https://github.com/webassembly/nontrapping-float-to-int-conversions. This change also codifies the mechanism for enabling new WebAssembly features by passing the `Features` object. Opcode now has a `IsEnabled(const Features&)` member function to query if the opcode is enabled. This means that the `--future-exceptions` flag has been renamed to `--enable-exceptions` for consistency. Checking whether the feature is enabled always happens at input; either WastParser or BinaryReader.
* Rename snake_case to MixedCase. (#579)Ben Smith2017-07-191-4/+4
| | | | There are no functional changes.
* Adds the concept of exceptions to wasm-objdump (#547)KarlSchimpf2017-07-031-0/+1
| | | | | | | | * Allow wasm-objdump to handle exceptions. * Fix writing exception section. * Make wasm-objdump handle exceptions, and add tests.
* Improve display of data segments (#520)Sam Clegg2017-06-231-0/+1
| | | | | | | Use the virtual address (init offset) when display the data rather that the file offset. Show the segment size in the header.
* [objdump] Split out state from ObjdumpOptions (#479)Sam Clegg2017-06-061-2/+8
| | | | | Also, use C++ constructor inheritance to avoid some boilerplate constructors.
* wasmdump: support multiple input files (#411)Sam Clegg2017-05-031-1/+1
| | | | This mimick how objdump behaves. Also makes the code more readable.
* Refactor wasmdump so that the disassembly pass has its own reader class (#395)Sam Clegg2017-04-051-1/+0
|
* Replace wabt::*vector with std::vector (#366)Ben Smith2017-03-221-7/+5
| | | | | | | | | | | | This propagates through a lot of code since std::vector will call constructors and destructors. In particular, this CL adds many default constructors and destructors to previously POD types. Many of them are only there to construct `Var` and `StringSlice` types, so they likely can be removed when those have their own constructors. Since unions members cannot contain constructors or destructors (without additional implementation), this CL changes those members to pointers instead. (Perhaps in a future CL these will be std::variant instead of union, so the members can be value types again.)
* Update relocation encoding to latest "spec" (#352)Sam Clegg2017-03-131-4/+0
| | | | | | | | | | | This brings wabt into line with what llvm is now producing and what is soon that land in the tool-conventions "spec" for static linking. Adds 'index' and (options) 'addend' to relocations. Define Reloc in common.h rather than once for each tool.
* Add --debug flag to wasmdump and wasm-link (#338)Sam Clegg2017-03-071-0/+1
| | | | | Enable logging in the binary reader when the --debug flag is passed to wasmdump and wasm-link
* Replace the Wabt/wabt prefix with a C++ namespace (#331)Ben Smith2017-03-021-17/+17
|
* Make most enumerations into enum classes (#329)Ben Smith2017-03-011-6/+6
|
* Remove struct and enum typedefs (#317)Ben Smith2017-02-241-6/+6
|
* Switch C files to CC files (#309)Ben Smith2017-02-231-7/+7
| | | | | | | | | | | | | | | | | Mostly this involves adding additional casts. Though there are a few more substantial changes: * The default method for relocating parser stacks no longer works because Bison assumes that C++ values can't be memcpy'd. Ours can, but there's no easy way to make the generated code do the right thing, so we do it manually * Removed all uses of WabtBool and replaced with bool * Renamed all uses of export and mutable -> export_ and mutable_ * Casting an invalid value to an enum triggers ubsan, so we have to be a little more careful about when we do it (see binary-reader.c:read_sections()) * It's illegal to forward-declare enums, so we just #include instead. * Designated initializers are not allowed in g++, so we have to switch them to lazily initialized structures instead. Pretty horrible, so it will be nice to have a better solution for C++.
* Remove WabtAllocator (#307)Ben Smith2017-02-171-3/+1
| | | | It complicates the code everywhere. It's faster to use a stack allocator, but not worth the trouble for maintainability.
* Rename all wasm prefixes to wabt (#298)Ben Smith2017-01-311-34/+34
|
* Add function names and relocations to wasmdump disassembly (#285)Sam Clegg2017-01-231-1/+14
|
* Improve wasmdump command line options (#284)Sam Clegg2017-01-201-1/+1
| | | | | | | | | * Improve wasmdump command line options These changes make wasmdump more closely match objdump. Change -v/--verbose to -x/--details. Change -r/--raw to -s/--full-contents. Error out unless on of -x/-d/-r/-h is specified. Previously wasmdump would simply print nothing at all which was confusing.
* Remove the "wasm-" prefix from source filesBen Smith2016-11-041-0/+55