<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/Shell/ObjectFile/PECOFF, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[LLDB] Unify DWARF section name matching (#141344)</title>
<updated>2025-06-09T08:46:50+00:00</updated>
<author>
<name>nerix</name>
<email>nerixdev@outlook.de</email>
</author>
<published>2025-06-09T08:46:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c6670fa20d434a85e167e88aa6a4f56bfc02af2f'/>
<id>c6670fa20d434a85e167e88aa6a4f56bfc02af2f</id>
<content type='text'>
Different object file formats support DWARF sections (COFF, ELF, MachO,
PE/COFF, WASM). COFF and PE/COFF only matched a subset. This caused some
GCC executables produced on MinGW to have issue later on when debugging.
One example is that `.debug_rnglists` was not matched, which caused
range-extraction to fail when printing a backtrace.

This unifies the parsing of section names in
`ObjectFile::GetDWARFSectionTypeFromName`, so all file formats can use
the same naming convention. Since the prefixes are different,
`GetDWARFSectionTypeFromName` only matches the suffixes (i.e. `.debug_`
needs to be stripped before).

I added two tests to ensure the sections are correctly identified on
Windows executables.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Different object file formats support DWARF sections (COFF, ELF, MachO,
PE/COFF, WASM). COFF and PE/COFF only matched a subset. This caused some
GCC executables produced on MinGW to have issue later on when debugging.
One example is that `.debug_rnglists` was not matched, which caused
range-extraction to fail when printing a backtrace.

This unifies the parsing of section names in
`ObjectFile::GetDWARFSectionTypeFromName`, so all file formats can use
the same naming convention. Since the prefixes are different,
`GetDWARFSectionTypeFromName` only matches the suffixes (i.e. `.debug_`
needs to be stripped before).

I added two tests to ensure the sections are correctly identified on
Windows executables.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Improve error message for unrecognized executables (#97490)</title>
<updated>2024-07-08T16:29:01+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2024-07-08T16:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed7e46877dc7f09b5d194f87c87bfc2bebfcf27a'/>
<id>ed7e46877dc7f09b5d194f87c87bfc2bebfcf27a</id>
<content type='text'>
Currently, LLDB prints out a rather unhelpful error message when passed
a file that it doesn't recognize as an executable.

&gt; error: '/path/to/file' doesn't contain any 'host' platform
&gt; architectures: arm64, armv7, armv7f, armv7k, armv7s, armv7m, armv7em,
&gt; armv6m, armv6, armv5, armv4, arm, thumbv7, thumbv7k, thumbv7s,
&gt; thumbv7f, thumbv7m, thumbv7em, thumbv6m, thumbv6, thumbv5, thumbv4t,
&gt; thumb, x86_64, x86_64, arm64, arm64e

I did a quick search internally and found at least 24 instances of users
being confused by this. This patch improves the error message when it
doesn't recognize the file as an executable, but keeps the existing
error message otherwise, i.e. when it's an object file we understand,
but the current platform doesn't support.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, LLDB prints out a rather unhelpful error message when passed
a file that it doesn't recognize as an executable.

&gt; error: '/path/to/file' doesn't contain any 'host' platform
&gt; architectures: arm64, armv7, armv7f, armv7k, armv7s, armv7m, armv7em,
&gt; armv6m, armv6, armv5, armv4, arm, thumbv7, thumbv7k, thumbv7s,
&gt; thumbv7f, thumbv7m, thumbv7em, thumbv6m, thumbv6, thumbv5, thumbv4t,
&gt; thumb, x86_64, x86_64, arm64, arm64e

I did a quick search internally and found at least 24 instances of users
being confused by this. This patch improves the error message when it
doesn't recognize the file as an executable, but keeps the existing
error message otherwise, i.e. when it's an object file we understand,
but the current platform doesn't support.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Move LocateExecutableSymbolFile to SymbolLocator plugin (#71266)</title>
<updated>2023-11-04T02:48:36+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2023-11-04T02:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19df9aa3f4ca4c1ab1976c980ffa7981329ea78c'/>
<id>19df9aa3f4ca4c1ab1976c980ffa7981329ea78c</id>
<content type='text'>
This builds on top of the work started in c3a302d to convert
LocateSymbolFile to a SymbolLocator plugin. This commit moves
LocateExecutableSymbolFile.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This builds on top of the work started in c3a302d to convert
LocateSymbolFile to a SymbolLocator plugin. This commit moves
LocateExecutableSymbolFile.</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][COFF] Map symbols without base+complex type as 'Data' type</title>
<updated>2022-09-28T09:57:12+00:00</updated>
<author>
<name>Alvin Wong</name>
<email>alvin@alvinhc.com</email>
</author>
<published>2022-09-28T09:46:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a67a05e93349e341d1325f1a6428d1373f77177'/>
<id>8a67a05e93349e341d1325f1a6428d1373f77177</id>
<content type='text'>
Both LLD and GNU ld write global/static variables to the COFF symbol
table with `IMAGE_SYM_TYPE_NULL` and `IMAGE_SYM_DTYPE_NULL` type. Map
these symbols as 'Data' type in the symtab to allow these symbols to be
used in expressions and printable.

Reviewed By: labath, DavidSpickett

Differential Revision: https://reviews.llvm.org/D134585
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both LLD and GNU ld write global/static variables to the COFF symbol
table with `IMAGE_SYM_TYPE_NULL` and `IMAGE_SYM_DTYPE_NULL` type. Map
these symbols as 'Data' type in the symtab to allow these symbols to be
used in expressions and printable.

Reviewed By: labath, DavidSpickett

Differential Revision: https://reviews.llvm.org/D134585
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][COFF] Add note to forwarder export symbols in symtab</title>
<updated>2022-09-28T09:57:11+00:00</updated>
<author>
<name>Alvin Wong</name>
<email>alvin@alvinhc.com</email>
</author>
<published>2022-09-28T09:45:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=acf7d081198f380d6ad2a1b859930e50a9cf2dae'/>
<id>acf7d081198f380d6ad2a1b859930e50a9cf2dae</id>
<content type='text'>
Forwarder exports do not point to a real function or variable. Instead
they point to a string describing which DLL and symbol to forward to.
Any imports which uses them will be redirected by the loader
transparently. These symbols do not have much use in LLDB, but keep them
just in case someone find it useful. Also set a synthesized name with
the forwarder string for informational purpose.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134518
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Forwarder exports do not point to a real function or variable. Instead
they point to a string describing which DLL and symbol to forward to.
Any imports which uses them will be redirected by the loader
transparently. These symbols do not have much use in LLDB, but keep them
just in case someone find it useful. Also set a synthesized name with
the forwarder string for informational purpose.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134518
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][COFF] Load absolute symbols from COFF symbol table</title>
<updated>2022-09-28T09:57:11+00:00</updated>
<author>
<name>Alvin Wong</name>
<email>alvin@alvinhc.com</email>
</author>
<published>2022-09-28T09:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7ebff6ab26aa03423c61e0370377f11725184199'/>
<id>7ebff6ab26aa03423c61e0370377f11725184199</id>
<content type='text'>
Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134517
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134517
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][COFF] Match symbols from COFF symbol table to export symbols</title>
<updated>2022-09-28T09:57:11+00:00</updated>
<author>
<name>Alvin Wong</name>
<email>alvin@alvinhc.com</email>
</author>
<published>2022-09-28T09:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=20c2f94c3cc10c41ab45e1be156540a06306cdf1'/>
<id>20c2f94c3cc10c41ab45e1be156540a06306cdf1</id>
<content type='text'>
If a symbol is the same as an export symbol, mark it as 'Additional' to
prevent the duplicated symbol from being repeated in some commands (e.g.
`disas -n func`). If the RVA is the same but exported with a different
name, only synchronize the symbol types.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134426
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a symbol is the same as an export symbol, mark it as 'Additional' to
prevent the duplicated symbol from being repeated in some commands (e.g.
`disas -n func`). If the RVA is the same but exported with a different
name, only synchronize the symbol types.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134426
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][COFF] Improve info of symbols from export table</title>
<updated>2022-09-28T09:57:10+00:00</updated>
<author>
<name>Alvin Wong</name>
<email>alvin@alvinhc.com</email>
</author>
<published>2022-09-28T09:43:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0870afc68e1a1ec303af1d0dbf952dd2c41f478a'/>
<id>0870afc68e1a1ec303af1d0dbf952dd2c41f478a</id>
<content type='text'>
- Skip dummy/invalid export symbols.
- Make the export ordinal of export symbols visible when dumping the
  symtab.
- Stop setting the 'Debug' flag and set the 'External' flag instead to
  better match the meaning of export symbols.
- Try to guess the type (code vs data) of the symbol from section flags.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134265
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Skip dummy/invalid export symbols.
- Make the export ordinal of export symbols visible when dumping the
  symtab.
- Stop setting the 'Debug' flag and set the 'External' flag instead to
  better match the meaning of export symbols.
- Try to guess the type (code vs data) of the symbol from section flags.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134265
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][COFF] Rewrite ParseSymtab to list both export and symbol tables</title>
<updated>2022-09-28T09:57:10+00:00</updated>
<author>
<name>Alvin Wong</name>
<email>alvin@alvinhc.com</email>
</author>
<published>2022-09-28T09:40:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bf0cda9ed2783a34efed3fc9804d784f7d1df242'/>
<id>bf0cda9ed2783a34efed3fc9804d784f7d1df242</id>
<content type='text'>
This reimplements `ObjectFilePECOFF::ParseSymtab` to replace the manual
data extraction with what `COFFObjectFile` already provides. Also use
`SymTab::AddSymbol` instead of resizing the SymTab then assigning each
elements afterwards.

Previously, ParseSymTab loads symbols from both the COFF symbol table
and the export table, but if there are any entries in the export table,
it overwrites all the symbols already loaded from the COFF symbol table.
Due to the change to use AddSymbols, this no longer happens, and so the
SymTab now contains all symbols from both tables as expected.

The export symbols are now ordered by ordinal, instead of by the name
table order.

In its current state, it is possible for symbols in the COFF symbol
table to be duplicated by those in the export table. This behaviour will
be modified in a separate change.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134196
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reimplements `ObjectFilePECOFF::ParseSymtab` to replace the manual
data extraction with what `COFFObjectFile` already provides. Also use
`SymTab::AddSymbol` instead of resizing the SymTab then assigning each
elements afterwards.

Previously, ParseSymTab loads symbols from both the COFF symbol table
and the export table, but if there are any entries in the export table,
it overwrites all the symbols already loaded from the COFF symbol table.
Due to the change to use AddSymbols, this no longer happens, and so the
SymTab now contains all symbols from both tables as expected.

The export symbols are now ordered by ordinal, instead of by the name
table order.

In its current state, it is possible for symbols in the COFF symbol
table to be duplicated by those in the export table. This behaviour will
be modified in a separate change.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D134196
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Stop passing both i386 and i686 in parallel as architectures on Windows</title>
<updated>2022-07-06T09:13:36+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2022-06-23T11:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4270c9cd44f2703bc5376ff085d0add156af9080'/>
<id>4270c9cd44f2703bc5376ff085d0add156af9080</id>
<content type='text'>
When an object file returns multiple architectures, it is treated
as a fat binary - which really isn't the case of i386 vs i686 where
the object file actually has one architecture.

This allows getting rid of hardcoded architecture triples in
PlatformWindows.

The parallel i386 and i686 architecture strings stem from
5e6f45201f0b62c1e7a24fc396f3ea6e10dc880d / D7120 and
ad587ae4ca143d388c0ec4ef2faa1b5eddedbf67 / D4658.

Differential Revision: https://reviews.llvm.org/D128617
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an object file returns multiple architectures, it is treated
as a fat binary - which really isn't the case of i386 vs i686 where
the object file actually has one architecture.

This allows getting rid of hardcoded architecture triples in
PlatformWindows.

The parallel i386 and i686 architecture strings stem from
5e6f45201f0b62c1e7a24fc396f3ea6e10dc880d / D7120 and
ad587ae4ca143d388c0ec4ef2faa1b5eddedbf67 / D4658.

Differential Revision: https://reviews.llvm.org/D128617
</pre>
</div>
</content>
</entry>
</feed>
