Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2024-07-02 08:44:24


Am 01.07.24 um 16:45 schrieb Niall Douglas via Boost:
> The relevant implementation file can be found at:
>
> https://github.com/boostorg/outcome/blob/master/include/boost/outcome/outcome_gdb.h

That is really neat indeed!

Only thing bothering me is the abundant quoting and quotes.

Maybe it looks a bit better with raw string literals.
I.e. instead of:

> __asm__(".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n"
> ".byte 4 /* Python Text */\n"
> ".ascii \"gdb.inlined-script\\n\"\n"
> ".ascii \"import gdb.printing\\n\"\n"
> ".ascii \"import os\\n\"\n");
this equivalent

> __asm__(R"py(.pushsection ".debug_gdb_scripts", "MS",@progbits,1
> .byte 4 /* Python Text */
> .ascii "gdb.inlined-script\n"
> .ascii "import gdb.printing\n"
> .ascii "import os\n"
> )py");
It looses the indentation though (otherwise it would be contained in the
binary.
I also don't see a way to avoid the '.ascii "' and '\n"' boilerplate and
just paste the python script but I think it more closely resembles it.


Alex




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk