а основной подробнейший ответ - не получил
всё равно смысла не вижу
у меня загвоздка с сменой знака, минус я думал устранить - взяв fabs(x) от числа. А плюс дописав -.
-
делает именно это -- меняет знак, не надо его реализовывать "более лучше". Вот так?
В противном случае заменить значение каждой переменной на противоположное?
алфавит то нужен, а ассемблер - только в одной из небольших подобластей ИБ
c
. Ответы на все остальные такие же вопросы -- apropos <действие>
(когда надо поискать возможные ассоциации для действия, или help <ключевое слово>
, для известных gdb ключевых слов, например:(gdb) apropos running
attach -- Attach to a process or file outside of GDB
info proc -- Show /proc process information about any running process
interrupt -- Interrupt the execution of the debugged program
load -- Dynamically load FILE into the running program
running -- Running the program
set annotate -- Set annotation_level
set charset -- Set the host and target character sets
set exec-wrapper -- Set a wrapper for running programs
set follow-exec-mode -- Set debugger response to a program call of exec
set host-charset -- Set the host character set
show annotate -- Show annotation_level
show charset -- Show the host and target character sets
show exec-wrapper -- Show the wrapper for running programs
show follow-exec-mode -- Show debugger response to a program call of exec
show host-charset -- Show the host character set
(gdb) help running
Running the program.
List of commands:
advance -- Continue the program up to the given location (same form as args for break command)
attach -- Attach to a process or file outside of GDB
continue -- Continue program being debugged
detach -- Detach a process or file previously attached
detach checkpoint -- Detach from a checkpoint (experimental)
detach inferiors -- Detach from inferior ID (or list of IDS)
disconnect -- Disconnect from a target
finish -- Execute until selected stack frame returns
handle -- Specify how to handle signals
inferior -- Use this command to switch between inferiors
interrupt -- Interrupt the execution of the debugged program
jump -- Continue program being debugged at specified line or address
kill -- Kill execution of program being debugged
kill inferiors -- Kill inferior ID (or list of IDs)
next -- Step program
nexti -- Step one instruction
queue-signal -- Queue a signal to be delivered to the current thread when it is resumed
reverse-continue -- Continue program being debugged but run it in reverse
reverse-finish -- Execute backward until just before selected stack frame is called
reverse-next -- Step program backward
reverse-nexti -- Step backward one instruction
reverse-step -- Step program backward until it reaches the beginning of another source line
reverse-stepi -- Step backward exactly one instruction
run -- Start debugged program
signal -- Continue program with the specified signal
start -- Run the debugged program until the beginning of the main procedure
step -- Step program until it reaches a different source line
stepi -- Step one instruction exactly
target -- Connect to a target machine or process
target core -- Use a core file as a target
target ctf -- Use a CTF directory as a target
target exec -- Use an executable file as a target
target extended-remote -- Use a remote computer via a serial line
target native -- Native process (started by the "run" command)
target record-btrace -- Collect control-flow trace and provide the execution history
target record-core -- Log program while executing and replay execution from log
target record-full -- Log program while executing and replay execution from log
target remote -- Use a remote computer via a serial line
target tfile -- Use a trace file as a target
task -- Use this command to switch between Ada tasks
thread -- Use this command to switch between threads
thread apply -- Apply a command to a list of threads
thread apply all -- Apply a command to all threads
thread find -- Find threads that match a regular expression
thread name -- Set the current thread's name
until -- Execute until the program reaches a source line greater than the current
Вообще компилятор всё это вырежет
$ cat test_nan.c
float f;
int g(void)
{
return f == f;
}
$ gcc test_nan.c -S -O2
$ cat test_nan.s
.file "test_nan.c"
.text
.p2align 4,,15
.globl g
.type g, @function
g:
.LFB0:
.cfi_startproc
movss f(%rip), %xmm0
xorl %eax, %eax
ucomiss %xmm0, %xmm0
setnp %al
ret
.cfi_endproc
.LFE0:
.size g, .-g
.comm f,4,4
.ident "GCC: (Debian 6.3.0-18+deb9u1) 6.3.0 20170516"
.section .note.GNU-stack,"",@progbits
вам советую изучить основы именно JS
он получает undefined в каком-то случае. Это спокойно обходится особенностями языка.
Сергей Горностаев,
"%[^\n]"
?