The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,615 other followers

Archive for October 12th, 2016

Delphi – unmangle names in BPL’s – Stack Overflow

Posted by jpluimers on 2016/10/12

Check out $(BDS)\source\cpprtl\Source\misc\unmangle.c – it contains the source code for the unmangling mechanism used by TDUMP, the debugger and the linker. (C++Builder and Delphi use the same mangling scheme.)

This has been around as long as BCC itself. However the file was called um.c instead of unmangle.c in older versions

Source: [WayBackDelphi – unmangle names in BPL’s – Stack Overflow both by User Moritz Beutel.

It’s the same mangling used in the TD32/TDS and MAP symbols.

And neede to improve https://github.com/jpluimers/map2dbg (which is my fork of https://github.com/andremussche/map2dbg) which contrary to it’s name also supports TDS/TD32 conversions in tds2pdb. The code is C# and works in virtually any Visual Studio version of 2012 and younger.

–jeroen

 

Posted in Debugging, Delphi, Development, MAP Symbol Information, Software Development, TD32/TDS Symbol information | Leave a Comment »

A great way to interactively browse xml/xhtml/html on the console: xmllint –shell

Posted by jpluimers on 2016/10/12

A while ago, I heard about xmllint, a program that can parse and query xml from the command-line.

Later, I discovered it can also parse html, can recover from xml/html errors and has an interactive shell that has a lot of commands (see table below) to navigate through the loaded command.

The relevant command-line options:

--recover
--html
--shell

Note that --recover will output failing input to stderr. You can ignore that using 2> /dev/null

Some good examples of usage are here:

The table of shell commands:

Shell

xmllint offers an interactive shell mode invoked with the –shell command. Available commands in shell mode include:
Command Parameter Description
base display XML base of the node
bye leave shell
cat node Display node if given or current node.
cd path Change the current node to path (if given and unique) or root if no argument given.
dir path Dumps information about the node (namespace, attributes, content).
du path Show the structure of the subtree under path or the current node.
exit Leave the shell.
help Show this help.
free Display memory usage.
load name Load a new document with the given name.
ls path List contents of path (if given) or the current directory.
pwd Display the path to the current node.
quit Leave the shell.
save name Saves the current document to name if given or to the original name.
validate Check the document for error.
write name Write the current node to the given filename.

–jeroen

via xmllint.

Posted in Development, HTML, HTML5, Software Development, Web Development, XML, XML/XSD, XPath | Leave a Comment »

 
%d bloggers like this: