Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/16/24 in Posts

  1. Darian Miller

    Any reason not to upgrade to 12.2 ?

    See some notes here for issues with 12.2: https://github.com/ideasawakened/DelphiKB/wiki/D29.ATHENS.12.2.0.0 I haven't updated the wiki yet for the 2 patches for 12.2 One reason to upgrade is Smart Codeinsight
  2. Uwe Raabe

    My sLineBreak is not working

    A TEdit can only show one line. For multi-lines use a TMemo instead.
  3. Anders Melander

    MAP2PDB - Profiling with VTune

    It took me a bit longer than expected to get here but I believe I've finally reached the goal. The following shows VTune profiling a Delphi application, with symbol, line number and source code resolution: Download Get the source here: https://bitbucket.org/anders_melander/map2pdb/ And a precompiled exe here: https://bitbucket.org/anders_melander/map2pdb/downloads/ The source has only been tested with Delphi 10.3 - uses inline vars so it will not compile with older versions. Usage map2pdb - Copyright (c) 2021 Anders Melander Version 2.0 Parses the map file produced by Delphi and writes a PDB file. Usage: map2pdb [options] <map-filename> Options: -v Verbose output -pdb[:<output-filename>] Writes a PDB (default) -yaml[:<output-filename>] Writes an YAML file that can be used with llvm-pdbutil -bind[:<exe-filename>] Patches a Delphi compiled exe file to include a reference to the pdb file -test Works on test data. Ignores the input file Example: Configure your project linker options to output a Detailed map file. Compile the project. Execute map2pdb <map-filename> -bind Profile the application with VTune (or whatever) Known issues The -bind switch must occur after the filename contrary to the usage instructions. PDB files larger than 16Mb are not valid. This is currently by design. 64-bit PE files are not yet supported by the -bind option. As should be evident I decided not to go the DWARF route after all. After using a few days to read the DWARF specification and examine the FPC source I decided that it would be easier to leverage the PDB knowledge I had already acquired. Not that this has been easy. Even though I've been able to use the LLVM PDB implementation and Microsoft's PDB source as a reference LLVM's implementation is incomplete and buggy and the LLVM source is "modern C++" which means that it's close to unreadable in places. Microsoft's source, while written in clean C and guaranteed to be correct, doesn't compile and is poorly commented. Luckily it was nothing a few all-nighters with a disassembler and a hex editor couldn't solve. Enjoy!
  4. Anders Melander

    MAP2PDB - Profiling with VTune

    I want a sex change operation so I can have your children. (it means "thank you" in case you wondered)
  5. Ruslan

    Internationalizing Applications

    I am trying to Internationalize a application using integrated Delphi feature using documentation. After the application is created I use "Resource DLL Wizard" and translated obtained forms. In documentation it is said that the application will automatically be translated by system locale settings, but also I would like to change the UI language from application settings. To test the application in different language I set the language from Project->Languages->Set Active, all builds and compiles but not working, an execution error rises Exception EResNotFound in module ExHome.exe at 00250A7D. Resource TfrmFDGUIxFormsError not found. Exception EClassNotFound in module ExHome.exe at 00065F62. Class TFDGUIxErrorDialog not found. Don't know how to fix that. Tried to remove FDGUIxWaitCursor and FDGUIxErrorDialog from project datamodule, but no luck. And the second question is how to change the language from application settings and use that language on next start? Can I save the current application language in a INI file? And how to add other translations for strings (messages, exceptions, etc.) used in units? Delphi 10.3 Application with FireDAC SQLite database
  6. Anders Melander

    MAP2PDB - Profiling with VTune

    New version (2.5) uploaded. Changes since last upload: Include/exclude modules/units from pdb. This helps keep the size of the pdb down and thus reduces the symbol resolve time in VTune. You no longer need to link your projects with debug info. map2pdb will reuse the existing debug section in the exe/dll/bpl if there is one. Otherwise it will create a new one. https://bitbucket.org/anders_melander/map2pdb/downloads/ What's next: Refactoring of the logging code. The current logging is basically just some functions that calls WriteLn. This should be replaced with a pluggable log framework so the whole logging mechanism can be replaced. The end goal is to enable integration of the map2pdb core into other projects. A jdbg reader. Embarcadero does not supply map files for the RTL/VCL rune time packages. Instead they ship jdbg files that can be read with the JEDI debug functions. The jdbg are built from map files so supposedly they contains much, if not all, of the information we need. The task here is to write a reader for the jdbg file format so we can produce pdb files from them. Figure out why VTune is so slow. A never ending task it seems.
×