mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 19:00:27 +00:00
Improved symbol table handling in SQLite shell (reapply f7ff77d8
)
This commit is contained in:
parent
17c5842c86
commit
f4e6b93bd2
2 changed files with 14 additions and 0 deletions
1
third_party/sqlite3/main.shell.c
vendored
1
third_party/sqlite3/main.shell.c
vendored
|
@ -1 +1,2 @@
|
||||||
|
STATIC_YOINK("zipos");
|
||||||
#include "third_party/sqlite3/main.c"
|
#include "third_party/sqlite3/main.c"
|
||||||
|
|
13
third_party/sqlite3/shell.c
vendored
13
third_party/sqlite3/shell.c
vendored
|
@ -131,11 +131,13 @@ typedef unsigned short int u16;
|
||||||
#include "libc/sysv/consts/rusage.h"
|
#include "libc/sysv/consts/rusage.h"
|
||||||
#include "libc/sysv/consts/s.h"
|
#include "libc/sysv/consts/s.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
|
#include "libc/runtime/symbols.internal.h"
|
||||||
#include "tool/args/args.h"
|
#include "tool/args/args.h"
|
||||||
#include "third_party/sqlite3/extensions.h"
|
#include "third_party/sqlite3/extensions.h"
|
||||||
#include "third_party/sqlite3/sqlite3expert.h"
|
#include "third_party/sqlite3/sqlite3expert.h"
|
||||||
#include "third_party/zlib/zlib.h"
|
#include "third_party/zlib/zlib.h"
|
||||||
#include "third_party/sqlite3/sqlite3.h"
|
#include "third_party/sqlite3/sqlite3.h"
|
||||||
|
|
||||||
typedef sqlite3_int64 i64;
|
typedef sqlite3_int64 i64;
|
||||||
typedef sqlite3_uint64 u64;
|
typedef sqlite3_uint64 u64;
|
||||||
typedef unsigned char u8;
|
typedef unsigned char u8;
|
||||||
|
@ -11426,6 +11428,8 @@ static char *cmdline_option_value(int argc, char **argv, int i){
|
||||||
# define main fiddle_main
|
# define main fiddle_main
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
STATIC_YOINK("zipos"); // for symtab
|
||||||
|
|
||||||
#if SQLITE_SHELL_IS_UTF8
|
#if SQLITE_SHELL_IS_UTF8
|
||||||
int SQLITE_CDECL main(int argc, char **argv){
|
int SQLITE_CDECL main(int argc, char **argv){
|
||||||
#else
|
#else
|
||||||
|
@ -11454,7 +11458,16 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
|
||||||
int argcToFree = 0;
|
int argcToFree = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// [jart] ensure %t symbols in strace log are symbolic
|
||||||
|
if (__strace > 0) {
|
||||||
|
GetSymbolTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ShowCrashReports();
|
||||||
|
|
||||||
|
// [jart] support /zip/.args file for white labeling
|
||||||
LoadZipArgs(&argc, &argv);
|
LoadZipArgs(&argc, &argv);
|
||||||
|
|
||||||
setBinaryMode(stdin, 0);
|
setBinaryMode(stdin, 0);
|
||||||
setvbuf(stderr, 0, _IONBF, 0); /* Make sure stderr is unbuffered */
|
setvbuf(stderr, 0, _IONBF, 0); /* Make sure stderr is unbuffered */
|
||||||
#ifdef SQLITE_SHELL_FIDDLE
|
#ifdef SQLITE_SHELL_FIDDLE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue