Skip to content

Instantly share code, notes, and snippets.

@mcepl
Last active October 12, 2022 15:19
Show Gist options
  • Save mcepl/5cc1713f372010709d585b18e569a8df to your computer and use it in GitHub Desktop.
Save mcepl/5cc1713f372010709d585b18e569a8df to your computer and use it in GitHub Desktop.
(gdb) b config_init_int_max_str_digits
Function "config_init_int_max_str_digits" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (config_init_int_max_str_digits) pending.
(gdb) run
Starting program: /home/abuild/rpmbuild/BUILD/Python-3.6.15/python -X faulthandler -X int_max_str_digits=7000
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.36-6.1.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, config_init_int_max_str_digits () at Python/pylifecycle.c:295
295 const char *env = config_get_env_var("PYTHONINTMAXSTRDIGITS");
(gdb) l
290 {
291 PyObject *xoptions, *key, *value;
292 int maxdigits;
293 int valid = 0;
294
295 const char *env = config_get_env_var("PYTHONINTMAXSTRDIGITS");
296 if (env) {
297 if (!pymain_str_to_int(env, &maxdigits)) {
298 valid = ((maxdigits == 0) || (maxdigits >= _PY_LONG_MAX_STR_DIGITS_THRESHOLD));
299 }
(gdb) n
311 xoptions = PySys_GetXOptions();
(gdb) n
312 if (!xoptions)
(gdb) l
307 }
308 _Py_global_config_int_max_str_digits = maxdigits;
309 }
310
311 xoptions = PySys_GetXOptions();
312 if (!xoptions)
313 return _Py_INIT_USER_ERR(
314 "Collection of -X options has failed.");
315
316 key = PyUnicode_FromString("int_max_str_digits");
(gdb) n
316 key = PyUnicode_FromString("int_max_str_digits");
(gdb) n
317 if (key) {
(gdb) n
_Py_InitializeEx_Private (install_sigs=1, install_importlib=<optimized out>) at Python/pylifecycle.c:733
733 config_init_int_max_str_digits();
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment