This has been coming up repeatedly for me.
I am attempting to determine if the -shared switch ignores debug data or not.
If -shared does ignore debug data, even when -g..g1..g3 are being used, then what
would be the likely cause of this?
If, on the other hand, the -shared switch does not ignore debug data, and said debug
data is being generated at the object level and subsequently linked, then why does that
debug data not appear when Mingw GDB attempts to read that specific debug data?
There is another if:
If, in a third case, -shared does not care about debug data one way or the other, then
why would debug data not be added to the respective object code? The object code, in this
case, will and is being linked and formed as a .dll. The build includes, for the sake of this
particular discussion, a -g switch or a -g3 switch.
As to test cases?
Well, can't say that I have any specific cases as the phenomenon re: the functionality of
the -shared switch is not, afaict, well documented.
All I really have is this: certain debug data is not being referenced by Mingw GDB even
after using the -shared switch and the -g switch. The expected debug data itself, is not
appearing when Mingw GDB is being used to debug certain .dlls which were generated
using "g++ -shared -g ...".