Recent

Author Topic: Wiki - specifying AT&T or Intel for gdb disassembly flavour  (Read 878 times)

ccrause

  • Full Member
  • ***
  • Posts: 158
Wiki - specifying AT&T or Intel for gdb disassembly flavour
« on: March 11, 2019, 09:40:59 am »
This weekend two people asked how to set the assembler view in Lazarus to a specific assembler dialect.  Turns out that since Lazarus 2.0 there is an AssemblerStyle debugger option for gdb (thanks Martin!).  For pre 2.0 versions one can set this through passing one of the following variations to Debugger_Startup_Options:
Code: GDB  [Select]
  1. -ex "set disassembly-flavor intel"
  2. --eval-command="set disassembly-flavor intel"
  3.  

I couldn't find this information on the wiki, so I am considering adding it. The are several wiki pages with gdb related information, but I don't know which page is the most appropriate for this information.  Some candidate pages:
GDB Debugger Tips - A likely page containing a bunch of different Lazarus + gdb related information.
Debugging - GDB tricks - Seems to relate to stand-alone use of gdb.
Debugger Setup - Introduction on how to get debugging using gdb working.

Any thoughts on which page would be the best location for this information?

Thaddy

  • Hero Member
  • *****
  • Posts: 8488
Re: Wiki - specifying AT&T or Intel for gdb disassembly flavour
« Reply #1 on: March 11, 2019, 11:13:57 am »
Well, it should be on a separate page explaining the different syntax, doesn't it? (I hate at&t's Polish notation, btw)
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

dsiders

  • Full Member
  • ***
  • Posts: 215
Re: Wiki - specifying AT&T or Intel for gdb disassembly flavour
« Reply #2 on: March 11, 2019, 12:07:16 pm »
Well, it should be on a separate page explaining the different syntax, doesn't it? (I hate at&t's Polish notation, btw)

I've always seen it referred to as Hungarian notation, but...

I'd also forgotten that Bell Labs was responsible for its existence. Thanks Stroustrup. ;)
Lazarus 2.0.2 / FPC 3.0.4 / Windows 8.1 64-bit

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5519
    • wiki
Re: Wiki - specifying AT&T or Intel for gdb disassembly flavour
« Reply #3 on: March 11, 2019, 12:23:18 pm »
Either http://wiki.freepascal.org/GDB_Debugger_Tips
Or start a new page with gdb related setup options. (which could then be linked from the current setup page)


With half a dozen different debuggers that the IDE now has, more such pages may be needed on the long time.

ccrause

  • Full Member
  • ***
  • Posts: 158
Re: Wiki - specifying AT&T or Intel for gdb disassembly flavour
« Reply #4 on: March 11, 2019, 03:12:27 pm »
I added a small section here.

Thaddy

  • Hero Member
  • *****
  • Posts: 8488
Re: Wiki - specifying AT&T or Intel for gdb disassembly flavour
« Reply #5 on: March 11, 2019, 03:19:14 pm »
I've always seen it referred to as Hungarian notation, but...
Hungarian notation is just adding " descriptive" prefixes, like pszSomeCharArray , Polish notation is like driving on the left (wrong side of the road, Howard!) by default.... It inverses L-R because it is easier to parse (not! sheer laziness at Palo Alto). I would recommend Forth for a powerful demonstration of that.  :o 8) :( :( (I can actually still program in Forth  :-[ and do so when I want to get a headache on purpose)
[edit]
There you go: free computer science history lesson... Palo Alto is not in Poland and Poland as a country is not in the U.S.A:, Hungary may be in(or temporarily confused with) the U.S.A. because of similar ignorance in government: the math behind it is invented by Lukasiewisz
https://en.wikipedia.org/wiki/Polish_notation
whereas:
https://en.wikipedia.org/wiki/Hungarian_notation

All those silly knowledge is not to exclude you from being a good programmer, but it is when discussing grammars.

Note that in the Netherlands, Polish people run a higher risk of causing an accident as a percentage of the total population. This is not caused by driving at the wrong side of the road perse, but by intoxication. (fact!)

Important note:
If you want to write a working compiler, start with Polish notation: much, much easier to get it right, but you need to be a bit off to program your own language...Forth should have been called Daft)
« Last Edit: March 11, 2019, 03:49:11 pm by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.