Genode fixes (#8501)
* Genode fixes - wrap strings in "Genode::Cstring" when logging - define SIGABRT for Genode - disable GCC -fstack-protector - use log RPC for fatal messages - add --os:genode build to appveyor - define paramStr and paramCount * Select fixups for Genode POSIX
This commit is contained in:
parent
87b2d2aad6
commit
2da0341b4d
9 changed files with 42 additions and 18 deletions
|
|
@ -982,7 +982,7 @@ proc genEcho(p: BProc, n: PNode) =
|
|||
# is threadsafe.
|
||||
internalAssert p.config, n.kind == nkBracket
|
||||
if p.config.target.targetOS == osGenode:
|
||||
# bypass libc and print directly to the Genode LOG session
|
||||
# echo directly to the Genode LOG session
|
||||
var args: Rope = nil
|
||||
var a: TLoc
|
||||
for it in n.sons:
|
||||
|
|
@ -990,8 +990,9 @@ proc genEcho(p: BProc, n: PNode) =
|
|||
add(args, ", \"\"")
|
||||
else:
|
||||
initLocExpr(p, it, a)
|
||||
add(args, ropecg(p.module, ", #nimToCStringConv($1)", [rdLoc(a)]))
|
||||
add(args, ropecg(p.module, ", Genode::Cstring($1->data, $1->len)", [rdLoc(a)]))
|
||||
p.module.includeHeader("<base/log.h>")
|
||||
p.module.includeHeader("<util/string.h>")
|
||||
linefmt(p, cpsStmts, """Genode::log(""$1);$n""", args)
|
||||
else:
|
||||
if n.len == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue