Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/07/21 in all areas

  1. 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!
  2. Lajos Juhász

    Embarcadero.com

    Well they're in the process to make a unique web experience. It will take maybe another 10-15 years. When finished it will be the greatest. I just hope that it will be more static. I wonder who thinks that those sliding topics at https://blogs.embarcadero.com/ is useful! It slides out before you could click. What's wrong with the traditional sites where you can see the links and click on them? (I know most probably they bought this technology and must showcase it everywhere, I will just visit the site only when it is necessary.)
  3. Anders Melander

    MAP2PDB - Profiling with VTune

    Fixed the problem where some symbols (in particular generics) either resolved to the calling unit or to a wrong line number in the implementing unit. Thanks to @Stefan Glienke for pestering me about this until it got solved. Source committed and binary uploaded. And now... Pizza! 🍕
  4. Stefan Glienke

    MAP2PDB - Profiling with VTune

    Profiling map2pdb with VTune using a pdb built with the map file from map2pdb 🤯 I guess that is fixable.
  5. Fr0sT.Brutal

    StockSharp, anybody worked with this?

    Of course absolutely no. Evil Russian hackers will drain all of your bitcoins in seconds just between faking US votes and drinking vodka with their bears
  6. Anders Melander

    StockSharp, anybody worked with this?

    N0n53N53. /733t d00d3
  7. Your Win64 fixes are now in SVN thanks, with a couple more that you missed because they were LongInt. Fortunately most PostMessages already casted pointers correctly, just these older samples. Angus
  8. Wagner Landgraf

    MAP2PDB - Profiling with VTune

    Works great here as well, just tested! Thank you @Anders Melander, for this awesome work. There is a big chance I can will ditch AQTime now!
  9. David Schwartz

    Learning Delphi

    I just made a list of some stuff off the top of my head. These are all things I run into pretty regularly, so they're not very mysterious. It would be instructive to make a list of all of the different ways the following three common idioms are expressed by different programmers in different projects, and how many variations can be found within the same large project: * Logic that would use a Case with a string discriminant if the language supported it * Ways of mapping Enums or regular consts (both numbers and strings) at run-time to some kind of display string that's more readable, including how they're initialized * Form interactions (we could be talking 2-3 DOZEN here!). Variations would include these idioms for both getting and setting values in the form: -- auto-create vs. on-the-fly creation and destruction -- constructor injection -- requires overloading Create that hides default ctor -- property injection -- method injection -- direct access of members (UGH!) -- forms that manage Add / Edit in the same form vs. one for each -- embedded selection popups on fields: read-only vs. ability to add something new (requires another form) -- field validation (before vs. after exiting the form) -- Hiding / Closing / Freeing the form Actually, I bet a whole book could be written on "Form Interactions in Delphi". It's hard to argue there's a "right way" or even a "best way" to do it, but there certainly are a LOT of ways!
  10. Daniel

    Notification of Replies

    Hi, just click the "follow"-box in the upper right. I admit, that this one is not easy to be recognised as a button, but it has some power...
  11. dummzeuch

    I will be less active for a few weeks

    Get well and I hope you won't get any of the Long Covid symptoms I read about. I plan to get vaccinated the first chance I get. Unfortunately that will likely not be before fall, given the current availability of the vaccines here in Germany, NRW. Too old to not be afraid, too young to get priority and no important job either. OTOH I can work from home 99.9% so it's OK.
  12. Vincent Parrett

    I will be less active for a few weeks

    That might be so, but you probably have a bunch of covid in the community too.. I'll stay down under where it's under control at the moment 😉
  13. Clément

    I will be less active for a few weeks

    I'm glad you're back! Still no vaccine for me. I'm too young . I hope by Aug or Sept I'll get my double dose.
  14. Vincent Parrett

    I will be less active for a few weeks

    Bugger, sorry to hear that, hope you are well on the mend! We've been extremely fortunate here and haven't had a community transmission case for quite some time (at least where I live). Being an island and closing the borders helped immensely. The vaccine rollout is very slow, I can't get it till end of May last I heard (lack of supply).
  15. Uwe Raabe

    I will be less active for a few weeks

    I have got my first shot on Sunday. Monday morning I felt like 20 again, where I also had massive problems to get out of bed (albeit for other reasons). Took a nap after dinner (can't remember doing such thing before). Fortunately that fatigue went away in the evening. So I highly recommend a vaccination, too.
  16. That does not work at all - CharNext does not work well. And that article is from 2007 - did we even have emojis back then? 😄 Try yourself with the testcase here: https://docs.microsoft.com/en-us/dotnet/core/compatibility/globalization/5.0/uax29-compliant-grapheme-enumeration
  17. pier

    Window hooking

    In case somebody is interested this is how I managed to nicely integrate matplotlib figures inside my delphi app. 1) the pythons script shows the plot with "plt.show(block=False)" 2) this is the code which executes the script and embeds the plot procedure TForm1.Button1Click(Sender: TObject); var plotwnd:HWND; begin PythonEngine1.ExecStrings( Synedit1.Lines ); plotwnd:=Findwindow(nil,'Figure 1'); if plotwnd<>0 then begin Windows.SetParent(plotwnd,(PageControl1.Pages[1] as TTabSheet).Handle); SetWindowLong(plotwnd, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) and not WS_BORDER and not WS_SIZEBOX and not WS_DLGFRAME ); showwindow(plotwnd,sw_showmaximized); setforegroundwindow(plotwnd); end; end; the plot is displayed inside a tabsheet which has an event handler to automatically resize the plot procedure TForm1.PlotResize(Sender: TObject); begin movewindow(plotwnd,0,0,(PageControl1.Pages[1] as TTabSheet).Width,(PageControl1.Pages[1] as TTabSheet).Height,True); end;
  18. Daniel

    emailx45....Just curious

    Account was deleted on request. But in general we do not discuss things like this in public. I will close this topic now.
  19. His post now show as "Guest". Did he delete his account or...
  20. I am temporarily disabled due to a fractured (bone fully severed at 75° acute angle) upper left arm after slipping on black ice. A nice clean fracture according to the doctors. No surgery or fancy stabilization planned, and the doctors want me to let the body handle it on its own, varying between letting it hang free and using a sling. Typing one handed on Android is somewhat frustrating, so I'll be less active until the worst pain phase is over.
  21. mvanrijnen

    I will be less active for a few weeks

    Being dutch living in the netherlands, i estimate a vaccin around Christmas 🙂
  22. Lars Fosdal

    I will be less active for a few weeks

    Update: I am no longer one-armed, but have about 1.65+ arms 😉 Mobility is decent and pain is limited, but there will be weeks of training to get back the strength and full use. To add insult to injury, I also caught the SARS-Cov-2 English mutation around March 16th, but I was lucky and got a very light progression, almost like a mild flu - but with an unusual amount of fatigue. Wife and stepson also got it, and they lost all sense of taste and smell, while I kept mine. Wife is currently getting her smell/taste back, but stepson still complains about food having no smell/taste or wrong taste, and that toothpaste tastes awful. We have no idea where we got it from, but I was visiting the hospital on that date, so it may even have been from there. The hardest part has been the fatigue. All my adult life, I have never been one to take a nap during the day, and typically have slept around 7 hours every night. The last weeks I've slept 7-8 hours during the night, and on several occasions 3-4 hours in the afternoon. I've been drained, both physically and mentally, and I still tire quickly, but it gets better every day. I highly recommend NOT contracting this shit! Keep your distance, wear that mask, wash those hands - and get vaccinated.
×