mirror of
https://github.com/rizinorg/rizin
synced 2026-08-22 20:26:16 -04:00
log.level help: Don't show 0:DEBUG on Release builds (#6319)
* log.level help: Don't show `0:DEBUG` on Release builds * Use `choco install python310` instead
This commit is contained in:
parent
4fe99052f4
commit
cbe820a2e0
5 changed files with 32 additions and 28 deletions
|
|
@ -61,7 +61,7 @@ init:
|
||||||
# Required software for building
|
# Required software for building
|
||||||
install:
|
install:
|
||||||
# Install Python 3.10
|
# Install Python 3.10
|
||||||
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" ( choco install python --version=3.10.11 )
|
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" ( choco install python310 )
|
||||||
# Update environment variables
|
# Update environment variables
|
||||||
- ps: $env:RZ_VERSION = (& (Join-Path $env:PYTHON python.exe) sys\\version.py )
|
- ps: $env:RZ_VERSION = (& (Join-Path $env:PYTHON python.exe) sys\\version.py )
|
||||||
- ps: $env:DIST_FOLDER = "rizin-$env:builder-$env:RZ_VERSION"
|
- ps: $env:DIST_FOLDER = "rizin-$env:builder-$env:RZ_VERSION"
|
||||||
|
|
|
||||||
|
|
@ -1438,7 +1438,7 @@ RZ_API int rz_core_analysis_fcn(RzCore *core, ut64 at, ut64 from, int reftype, i
|
||||||
|
|
||||||
if (core->io->va) {
|
if (core->io->va) {
|
||||||
if (!rz_io_is_valid_offset(core->io, at, !aopt->noncode)) {
|
if (!rz_io_is_valid_offset(core->io, at, !aopt->noncode)) {
|
||||||
RZ_LOG_DEBUG("address not mapped or not executable at 0x%08" PFMT64x "\n", at);
|
RZ_LOG_VERBOSE("Address not mapped or not executable at 0x%" PFMT64x ".\n", at);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3352,8 +3352,12 @@ RZ_API int rz_core_config_init(RzCore *core) {
|
||||||
/* log */
|
/* log */
|
||||||
// RZ_LOGLEVEL / log.level
|
// RZ_LOGLEVEL / log.level
|
||||||
p = rz_sys_getenv("RZ_LOGLEVEL");
|
p = rz_sys_getenv("RZ_LOGLEVEL");
|
||||||
SETICB("log.level", p ? atoi(p) : RZ_DEFAULT_LOGLVL, cb_log_config_level, "Target log level/severity"
|
const char *log_level_help = "Target log level/severity ("
|
||||||
" (0:DEBUG, 1:VERBOSE, 2:INFO, 3:WARN, 4:ERROR, 5:FATAL)");
|
#if RZ_BUILD_DEBUG
|
||||||
|
"0:DEBUG, "
|
||||||
|
#endif
|
||||||
|
"1:VERBOSE, 2:INFO, 3:WARN, 4:ERROR, 5:FATAL)";
|
||||||
|
SETICB("log.level", p ? atoi(p) : RZ_DEFAULT_LOGLVL, cb_log_config_level, log_level_help);
|
||||||
free(p);
|
free(p);
|
||||||
|
|
||||||
#if RZ_BUILD_DEBUG
|
#if RZ_BUILD_DEBUG
|
||||||
|
|
|
||||||
|
|
@ -150,30 +150,6 @@ WARNING: Failed to initialize section string table.
|
||||||
EOF
|
EOF
|
||||||
RUN
|
RUN
|
||||||
|
|
||||||
NAME=elf warnings
|
|
||||||
FILE=bins/elf/analysis/tiny.elf
|
|
||||||
CMDS=iSS
|
|
||||||
EXPECT=<<EOF
|
|
||||||
paddr size vaddr vsize align perm name
|
|
||||||
------------------------------------------------------------
|
|
||||||
0x00000000 0x10020 0x00010000 0x10020 0xc0312ab3 -r-- LOAD0
|
|
||||||
0x00000000 0x2d 0x00010000 0x2d 0x0 -rw- ehdr
|
|
||||||
EOF
|
|
||||||
EXPECT_ERR=<<EOF
|
|
||||||
WARNING: Failed to read ELF header (e_phnum).
|
|
||||||
WARNING: Failed to read ELF header (e_shentsize).
|
|
||||||
WARNING: Failed to read ELF header (e_shnum).
|
|
||||||
WARNING: Failed to read ELF header (e_shstrndx).
|
|
||||||
WARNING: The binary seems to be a tiny elf (45 bytes). Reload e_phnum value.
|
|
||||||
WARNING: Number of sections is 0.
|
|
||||||
WARNING: phdr entry: p_offset (0x0) + p_filesz (65568 bytes) > binary size (45 bytes).
|
|
||||||
WARNING: phdr entry: p_offset (0x0) and p_vaddr (0x10000) are not congruent for p_align (0xc0312ab3).
|
|
||||||
WARNING: The segment 0 at 0x4 seems to be invalid.
|
|
||||||
WARNING: ELF header e_shstrndx value (0) >= number of sections (0).
|
|
||||||
WARNING: Failed to initialize section string table.
|
|
||||||
EOF
|
|
||||||
RUN
|
|
||||||
|
|
||||||
NAME=disable segments checks
|
NAME=disable segments checks
|
||||||
FILE=bins/elf/analysis/tiny.elf
|
FILE=bins/elf/analysis/tiny.elf
|
||||||
ARGS=-e elf.checks.segments=false
|
ARGS=-e elf.checks.segments=false
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,10 @@ CMDS=<<EOF
|
||||||
%v entry0; e asm.bytes=true; pdq 4 @ entry0;
|
%v entry0; e asm.bytes=true; pdq 4 @ entry0;
|
||||||
echo ---
|
echo ---
|
||||||
oml
|
oml
|
||||||
|
echo ---
|
||||||
|
iSS
|
||||||
|
e log.level=1
|
||||||
|
aF
|
||||||
EOF
|
EOF
|
||||||
EXPECT=<<EOF
|
EXPECT=<<EOF
|
||||||
0x10020
|
0x10020
|
||||||
|
|
@ -14,5 +18,25 @@ EXPECT=<<EOF
|
||||||
0x00010025 cd80 int 0x80
|
0x00010025 cd80 int 0x80
|
||||||
---
|
---
|
||||||
1 fd: 3 +0x00000000 0x00010000 * 0x0002001f r-- fmap.LOAD0
|
1 fd: 3 +0x00000000 0x00010000 * 0x0002001f r-- fmap.LOAD0
|
||||||
|
---
|
||||||
|
paddr size vaddr vsize align perm name
|
||||||
|
------------------------------------------------------------
|
||||||
|
0x00000000 0x10020 0x00010000 0x10020 0xc0312ab3 -r-- LOAD0
|
||||||
|
0x00000000 0x2d 0x00010000 0x2d 0x0 -rw- ehdr
|
||||||
|
EOF
|
||||||
|
EXPECT_ERR=<<EOF
|
||||||
|
WARNING: Failed to read ELF header (e_phnum).
|
||||||
|
WARNING: Failed to read ELF header (e_shentsize).
|
||||||
|
WARNING: Failed to read ELF header (e_shnum).
|
||||||
|
WARNING: Failed to read ELF header (e_shstrndx).
|
||||||
|
WARNING: The binary seems to be a tiny elf (45 bytes). Reload e_phnum value.
|
||||||
|
WARNING: Number of sections is 0.
|
||||||
|
WARNING: phdr entry: p_offset (0x0) + p_filesz (65568 bytes) > binary size (45 bytes).
|
||||||
|
WARNING: phdr entry: p_offset (0x0) and p_vaddr (0x10000) are not congruent for p_align (0xc0312ab3).
|
||||||
|
WARNING: The segment 0 at 0x4 seems to be invalid.
|
||||||
|
WARNING: ELF header e_shstrndx value (0) >= number of sections (0).
|
||||||
|
WARNING: Failed to initialize section string table.
|
||||||
|
ERROR: Failed to read chunk of size 0x101 at 0x10020 for disassembly.
|
||||||
|
VERBOSE: Address not mapped or not executable at 0x10020.
|
||||||
EOF
|
EOF
|
||||||
RUN
|
RUN
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue