Bug 184122 - Additional formats for Decoding Table
Summary: Additional formats for Decoding Table
Status: CONFIRMED
Alias: None
Product: okteta
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Friedrich W. H. Kossebau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 11:01 UTC by Pavol Rusnak
Modified: 2019-09-28 14:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavol Rusnak 2009-02-12 11:01:00 UTC
Version:           0.2.0 (using KDE 4.2.0)
OS:                Linux
Installed from:    SuSE RPMs

There are some formats that could be added to Decoding Table like:

* long double
* Intel assembler opcodes (ASM)
* ANSI SQL date & time (64-bit)
* UNIX/C/FORTRAN date & time, secs (32-bit)
* UNIX/C/FORTRAN date & time, mins (32-bit)
* Java date & time (64-bit)

and probably (but these are from Windows area, so I'm not quite convinced about adding them):
* MS-DOS date & time (32-bit)
* Win32 FILETIME (64-bit)
* OLE 2.0 date & time (64-bit)
Comment 1 Friedrich W. H. Kossebau 2009-03-03 23:47:40 UTC
Thanks for filing your wishes :)
Good ideas, just would need some pointers to the format or, even better, some example code for decoding (and encoding, soon to come).
With more entries the decoding table tool will need a config dialog to restrict the shown entries, best by user-definable sets, but that should be straightforward.
Comment 2 Pavol Rusnak 2009-03-06 09:38:21 UTC
It might make sense to create separate disassembly window and not integrate it with Decoding Table. For Assembler opcodes there are a few disassembler libraries:
* libdisasm - http://bastard.sourceforge.net/libdisasm.html
  - last release January 2008
  - seems to support only x86
* udis86 - http://udis86.sourceforge.net/
  - last release June 2008
  - supports both x86 and x86_64
* distorm64 - http://www.ragestorm.net/distorm/
  - last release September 2008
  - seems to have the most complete support (up to SSE4, VMX, ...)

---------------------

Following datatypes could be later reused in Template editing mentioned in bug#184123.

MS-DOS date & time (32-bit )
  bits  : meaning
 0 -  4 : seconds/2 (0-29)
 5 - 10 : minutes   (0-59)
 1 - 15 : hours     (0-23)
16 - 20 : day       (1-31)
21 - 24 : month     (1-12)
25 - 31 : year-1980

Win32 FILETIME (64-bit)
- integer number of 100 nanosecond intervals since 1.1.1601 (or milliseconds*10)

OLE 2.0 date & time (64-bit)
- real number (double precision)
- integer part - number of days since 30.12.1899
- fraction part - time (.0 is 0:00, 0.25 is 6:00, 0.5 is 12:00, 0.75 is 18:00)

* ANSI SQL date & time (64-bit)
- two consecutive 32-bit integers
- first: number of days since 17.11.1858
- number of 100 millisecond intervals since midnight

* UNIX/C/FORTRAN date & time, secs (32-bit)
- integer - number of seconds since 1.1.1970

* UNIX/C/FORTRAN date & time, mins (32-bit)
- integer - number of seconds since 1.1.1970

* Macintosh HFS+ Date & Time (32-bit)
- integer - number of seconds since 1.1.1904

* Java date & time (64-bit)
- integer - number of milliseconds since 1.1.1970
Comment 3 Friedrich W. H. Kossebau 2009-04-07 13:56:26 UTC
Thanks for the pointers. Will not make it for KDE 4.3, but perhaps 4.4. Patches are welcome and will improve speed of implementation, as always :)

For the disassembler, yes, that should be a separate tool/view. I hope to get to that one day, as I am interested to have that myself.
Comment 4 Simon Hüllmandel 2019-09-28 14:20:53 UTC
It might also be nice to support integers other than {8,16,32,64}-bit.
One format I'm working with uses one byte to specify the "size" of the integer following this byte.
This can result in e.g 3-byte (24-bit) integers like this: 03 AB CD EF would be 0xEFCDAB.

I'm not asking for support for this specific binary format, but some way to decode these.
One way I'm thinking of would be to go by mouse/keyboard selection.
I.e. you would select AB CD EF in the file view and get the value in the decoding table either in a new row or by restricting the existing rows to the selection.