AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

DLL debuggen

Ein Thema von himitsu · begonnen am 3. Nov 2023 · letzter Beitrag vom 15. Nov 2023
Antwort Antwort
Seite 4 von 4   « Erste     234   
Benutzerbild von Sinspin
Sinspin

Registriert seit: 15. Sep 2008
Ort: Dubai
618 Beiträge
 
Delphi 10.3 Rio
 
#31

AW: DLL debuggen

  Alt 14. Nov 2023, 16:06
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.
Stefan
Nur die Besten sterben jung
A constant is a constant until it change.
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.149 Beiträge
 
Delphi 12 Athens
 
#32

AW: DLL debuggen

  Alt 14. Nov 2023, 17:02
Dort ist ein Eurekalog drin, in diesen Packages.
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
213 Beiträge
 
#33

AW: DLL debuggen

  Alt 14. Nov 2023, 17:39
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.
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
213 Beiträge
 
#34

AW: DLL debuggen

  Alt 14. Nov 2023, 17:42
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.
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.149 Beiträge
 
Delphi 12 Athens
 
#35

AW: DLL debuggen

  Alt 14. Nov 2023, 18:06
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)
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests

Geändert von himitsu (14. Nov 2023 um 18:13 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von Sinspin
Sinspin

Registriert seit: 15. Sep 2008
Ort: Dubai
618 Beiträge
 
Delphi 10.3 Rio
 
#36

AW: DLL debuggen

  Alt 15. Nov 2023, 06:30
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.
Stefan
Nur die Besten sterben jung
A constant is a constant until it change.
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.149 Beiträge
 
Delphi 12 Athens
 
#37

AW: DLL debuggen

  Alt 15. Nov 2023, 08:54
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
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
213 Beiträge
 
#38

AW: DLL debuggen

  Alt 15. Nov 2023, 10:14
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 )
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
213 Beiträge
 
#39

AW: DLL debuggen

  Alt 15. Nov 2023, 10:17
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.
  Mit Zitat antworten Zitat
Benutzerbild von Sinspin
Sinspin

Registriert seit: 15. Sep 2008
Ort: Dubai
618 Beiträge
 
Delphi 10.3 Rio
 
#40

AW: DLL debuggen

  Alt 15. Nov 2023, 13:46
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".
Stefan
Nur die Besten sterben jung
A constant is a constant until it change.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 4 von 4   « Erste     234   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:02 Uhr.
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