Delphi-PRAXiS
Seite 4 von 4   « Erste     234   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Die Delphi-IDE (https://www.delphipraxis.net/62-die-delphi-ide/)
-   -   DLL debuggen (https://www.delphipraxis.net/213997-dll-debuggen.html)

Sinspin 14. Nov 2023 16:06

AW: DLL debuggen
 
Ich sag nur MadExcept, das löst 99.9% aller dieser Fragen in Luft auf.
Es gibt zwar noch immer Fälle wo was daran vorbei kracht. Gerade wenn es um eine nicht Delphi dll geht, aber alles in allem ist das schon eine feine Sache.

himitsu 14. Nov 2023 17:02

AW: DLL debuggen
 
Dort ist ein Eurekalog drin, in diesen Packages.

Kas Ob. 14. Nov 2023 17:39

AW: DLL debuggen
 
I am not sure that understand half of the former posts due the translation.

And sorry if that i am missing the point.
This line brings me to something i saw in either D2009 and D2010 years back, (or it was D2010 and XE5, i really can't remember)
Code:
Process start: C:\Develop\ActiveScripting\ Win32 \Debug\Scripting.e xe. Base address: $00EC0000. Process Scripting.exe (8064)
Load module: Scripting.exe. Without debug information . Base address: $00EC0000. Process Scripting.exe (8064)
The problem was that : EXE is not in the same folder as the dpr while the dpr of the EXE and the DLL in the ProjectGroup.

On other hand i will check and make sure to disable all Debug information handling in EurekaLog for these projects, it might introduced some regression, or test an older stable version, because EL does restructure the EXE, and could did mess something.

Kas Ob. 14. Nov 2023 17:42

AW: DLL debuggen
 
There is also something to try, move both the EXE and DLL into one folder and make sure the IDE doesn't have any opened projects, then debug from there or attach to running process.

himitsu 14. Nov 2023 18:06

AW: DLL debuggen
 
Ja, beim ursprünglichen Test hier, ging es nur um eine EXE und eine DLL, wo einfach immer alles gedebuggt werden sollte.
Aber grundsätzlich sollte es auch für alle anderen Projekte möglich sein.


Wir haben fast 100 eigene BPL/DLL/EXE (werden im FinalBuilder oder Delphi kompiliert)
und dazu noch 47 BPL und einige DLL für Fremdkomponenten, plus weitere 238 BPL vom DevExpress, welche durch den FinalBuilder erzeugt werden.
Seit unserem neuen FB-Script für D10 D11+, mit externen TDS, damit die DebugInfos sich standardmäßig einfach entfernen lassen (aber auch mit internen TDS probiert),
weil "normal" will man beim Debuggen seinen eigenen Code durchgehn, oder nur den Code einer bestimmten Komponente, und sich nicht andauernd in Fremd-Code verlaufen.

Im Moment hoffe ich noch, dass irgendwo einfach nur eine Option falsch steht, weswegen es garnicht geht.
Bei einem Teil geht es ja inzwischen, wo mit MSBuild gearbeitet wird, gegenüber den manuellen DCC32.

Es muß doch irgendwie möglich sein, dass man ohne ständiges Rumgepfusche einfach so debuggen kann, indem man im Delphi auf F9 drückt und anschließend alle vorhandenen Debuginfos benutzt werden. (das Log sagt ja, dass die Infos vorhanden sind)

Sinspin 15. Nov 2023 06:30

AW: DLL debuggen
 
Das klappt bei uns bisher eigentlich.
Project Einstellungen unter "debugging" : "true", "Debug information", "true", "Reference info", "false", "true".
Compiliert wird mit Delphi. Single exe, keine bpl, aber Dll's.
Keine Ahnung ob MadExcept/EurekaLog da noch irgendwo anders Einfluss nimmt.
Ich mache das aber eher selten via Delphi. Log und debug output sind oft schneller als durch den Code steppen.
Zumal Delphi sich gerne selber in die Beine schießt und alles in den Abgrund reißt.

himitsu 15. Nov 2023 08:54

AW: DLL debuggen
 
Zitat:

Zitat von Sinspin (Beitrag 1529696)
Das klappt bei uns bisher eigentlich.
Project Einstellungen unter "debugging" : "true", "Debug information", "true", "Reference info", "false", "true".
Compiliert wird mit Delphi. Single exe, keine bpl, aber Dll's.

NurDefinition=false und dann natürlich auch noch beim Linken aktiviert.

EXE/DLL und eigene BPL debuggen geht inzwischen meistens,
aber die "selbstkompilierten" BPLs der Fremdkomponenten gehen nicht.
also eigentlich geht es, im Prinzip, aber es will hier einfach nicht ... k.A. warum

Eigenes wird seit Kurzem mit MSBuild kompiliert -> intern ruft das aber auch nur den DCC32 auf (geht, obwohl anschließend nochmal der ECC drangelassen wird)
und Fremdes wird aktuell noch über die Delphi-Action im FinalBuilder direkt mit DCC32 kompiliert

Kas Ob. 15. Nov 2023 10:14

AW: DLL debuggen
 
OK, while i didn't completely understand the first two lines in post #35, but let me explain again, and sorry for the bad English.

We need to approach this by logic, so we can form a theory then test it, confirm a reason only after that will fix it for good, not leaving it to hit and miss and probable will work, you have testing bed with all these many files so it will be great for testing, the point is not to waste your time, but to fix this from the root, sure we need to find the root first or at least a direction.

In debugging with the IDE there is three things involved in this case.
1) Debugger module, loading the binaries EXE/DLL into memory and parsing the TDS info.
2) The IDE running the Debugger and controlling it to some extend or in full, but it will be responsible for providing the source files to browse !, and this is critical here, so it might be responsible to provide the DCU parser or the source file it self, i can't be sure if the DCUs are involved here.
3) EurekaLog that did something to the binaries headers and structure and might be even the TDS itself.

I can imagine a scenarios where (1) and (2) conflicting with each others, i don't know who is the responsible to read and access the source files, so what if the debugger found the TDS, then asked the the IDE to parse the DPR/DPROJ file to find the directories for the sources, remember that Delphi TDS doesn't have paths !
Also it could be the Debugger have its own outdated DPR/DPROJ parser, also is viable cause, what if the IDE and because the DPR/DPROJ are not saved and considered changed because EL and its modification to DPR, put the DPR at locked hence prevent the Debugger from accessing a file...
Another scenario with EL, like patched the binary and the IDE marked the DCUs as not for this binary and prevented the debugger from loading these files.

Most likely, either IDE or the Debugger or both failed to parse or access, but more seriously failed miserably to report what did really happen.

See, there is many scenarios here, and that why i asked if you try to debug that application without the DPR/DPROJ, will the debugger provide functions names ?
Just try another IDE and don't close your project, if that the case then we already greatly narrowed the search for this problem, (may be greatly is suitable to narrow :gruebel: )

Kas Ob. 15. Nov 2023 10:17

AW: DLL debuggen
 
One more thing,
After confirming if that does have something to do files and parsing, we (i mean you) will have to use ProcMon or the great ApiMonitor to compare how the IDE and its debugger behave and fail if there is a failure on some IO access, or did they read the whole TDS info or stopped parsing the header.

Sinspin 15. Nov 2023 13:46

AW: DLL debuggen
 
Zitat:

Zitat von himitsu (Beitrag 1529711)
Zitat:

Zitat von Sinspin (Beitrag 1529696)
Das klappt bei uns bisher eigentlich.
Project Einstellungen unter "debugging" : "true", "Debug information", "true", "Reference info", "false", "true".
Compiliert wird mit Delphi. Single exe, keine bpl, aber Dll's.

NurDefinition=false und dann natürlich auch noch beim Linken aktiviert.

Jup. Debug information = "true", Mapfile = "detailed", Separate TDS = "false".


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:06 Uhr.
Seite 4 von 4   « Erste     234   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz