简介

在nginx源代码中有大量的任务被加到红黑树中,或者通过注册回调函数来实现,通过阅读源码很难发现和跟踪执行流程。但是通过调试nginx代码可以很清晰的跟踪nginx执行的流程,可以很直观的发现一次http请求响应完整处理生命周期。


nginx modules顺序调试:
1: m = 16
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0x4af79a , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4af761 , merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a500
1: m = 16
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0195 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b00de , merge_loc_conf = 0x4b0117 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a6e0
1: m = 16
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0195 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b00de , merge_loc_conf = 0x4b0117 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a6e0
1: m = 16
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0195 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b00de , merge_loc_conf = 0x4b0117 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a6e0
1: m = 16
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0195 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b00de , merge_loc_conf = 0x4b0117 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a6e0
1: m = 17
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0195 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b00de , merge_loc_conf = 0x4b0117 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a6e0
1: m = 17
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0ae8 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b0a34 , merge_loc_conf = 0x4b0a6d }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a8c0
1: m = 17
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0ae8 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b0a34 , merge_loc_conf = 0x4b0a6d }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a8c0
1: m = 17
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0ae8 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b0a34 , merge_loc_conf = 0x4b0a6d }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a8c0
1: m = 17
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0ae8 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b0a34 , merge_loc_conf = 0x4b0a6d }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a8c0
1: m = 18
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0x4b0ae8 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b0a34 , merge_loc_conf = 0x4b0a6d }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71a8c0
1: m = 18
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b1c47 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b15a2 , merge_loc_conf = 0x4b15f3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71aba0
1: m = 18
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b1c47 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b15a2 , merge_loc_conf = 0x4b15f3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71aba0
1: m = 18
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b1c47 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b15a2 , merge_loc_conf = 0x4b15f3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71aba0
1: m = 18
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b1c47 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b15a2 , merge_loc_conf = 0x4b15f3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71aba0
1: m = 19
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0x4b1c47 , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b15a2 , merge_loc_conf = 0x4b15f3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71aba0
1: m = 19
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b39fc , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b305c , merge_loc_conf = 0x4b30ad }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71ae80
1: m = 19
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b39fc , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b305c , merge_loc_conf = 0x4b30ad }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71ae80
1: m = 19
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b39fc , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b305c , merge_loc_conf = 0x4b30ad }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71ae80
1: m = 19
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4b39fc , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b305c , merge_loc_conf = 0x4b30ad }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71ae80
1: m = 20
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0x4b39fc , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4b305c , merge_loc_conf = 0x4b30ad }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71ae80
1: m = 20
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4b45e0 , postconfiguration = 0x4b465d , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4b44b3 , merge_loc_conf = 0x4b4504 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b080
1: m = 20
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0x4b45e0 , postconfiguration = 0x4b465d , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4b44b3 , merge_loc_conf = 0x4b4504 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b080
1: m = 20
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4b45e0 , postconfiguration = 0x4b465d , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4b44b3 , merge_loc_conf = 0x4b4504 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b080
1: m = 20
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4b45e0 , postconfiguration = 0x4b465d , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4b44b3 , merge_loc_conf = 0x4b4504 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b080
1: m = 21
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0x4b45e0 , postconfiguration = 0x4b465d , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4b44b3 , merge_loc_conf = 0x4b4504 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b080
1: m = 21
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736ea0
1: m = 21
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736ea0
1: m = 21
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736ea0
1: m = 22
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736ea0
1: m = 22
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4b870e , postconfiguration = 0, create_main_conf = 0x4b878b ,
  init_main_conf = 0x4b880e , create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b560
1: m = 22
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4b870e , postconfiguration = 0, create_main_conf = 0x4b878b ,
  init_main_conf = 0x4b880e , create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b560
1: m = 22
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4b870e , postconfiguration = 0, create_main_conf = 0x4b878b ,
  init_main_conf = 0x4b880e , create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b560
1: m = 23
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0x4b870e , postconfiguration = 0, create_main_conf = 0x4b878b ,
  init_main_conf = 0x4b880e , create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71b560
1: m = 23
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4b9181 , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71bb20
1: m = 23
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4b9181 , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71bb20
1: m = 23
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4b9181 , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71bb20
1: m = 24
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4b9181 , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71bb20
1: m = 24
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f00
1: m = 24
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f00
1: m = 24
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f00
1: m = 25
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f00
1: m = 25
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4bace0 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bad29 , merge_loc_conf = 0x4badaa }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71be80
1: m = 25
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4bace0 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bad29 , merge_loc_conf = 0x4badaa }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71be80
1: m = 25
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4bace0 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bad29 , merge_loc_conf = 0x4badaa }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71be80
1: m = 26
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0x4bace0 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bad29 , merge_loc_conf = 0x4badaa }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71be80
1: m = 26
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4bbf3e , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bbdbd , merge_loc_conf = 0x4bbe1a }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c160
1: m = 26
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4bbf3e , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bbdbd , merge_loc_conf = 0x4bbe1a }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c160
1: m = 26
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4bbf3e , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bbdbd , merge_loc_conf = 0x4bbe1a }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c160
1: m = 26
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0x4bbf3e , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bbdbd , merge_loc_conf = 0x4bbe1a }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c160
1: m = 27
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0x4bbf3e , create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4bbdbd , merge_loc_conf = 0x4bbe1a }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c160
1: m = 27
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4bdd53 , postconfiguration = 0x4bf0b8 , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0x4bddd0 , merge_srv_conf = 0x4bdec2 , create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c900
1: m = 27
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0x4bdd53 , postconfiguration = 0x4bf0b8 , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0x4bddd0 , merge_srv_conf = 0x4bdec2 , create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c900
1: m = 27
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4bdd53 , postconfiguration = 0x4bf0b8 , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0x4bddd0 , merge_srv_conf = 0x4bdec2 , create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c900
1: m = 27
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4bdd53 , postconfiguration = 0x4bf0b8 , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0x4bddd0 , merge_srv_conf = 0x4bdec2 , create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c900
1: m = 28
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0x4bdd53 , postconfiguration = 0x4bf0b8 , create_main_conf = 0, init_main_conf = 0,
  create_srv_conf = 0x4bddd0 , merge_srv_conf = 0x4bdec2 , create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71c900
1: m = 28
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4c3984 , postconfiguration = 0, create_main_conf = 0x4c3a01 , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4c3a6d , merge_loc_conf = 0x4c3d98 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71e0e0
1: m = 28
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4c3984 , postconfiguration = 0, create_main_conf = 0x4c3a01 , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4c3a6d , merge_loc_conf = 0x4c3d98 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71e0e0
1: m = 28
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4c3984 , postconfiguration = 0, create_main_conf = 0x4c3a01 , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4c3a6d , merge_loc_conf = 0x4c3d98 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71e0e0
1: m = 29
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0x4c3984 , postconfiguration = 0, create_main_conf = 0x4c3a01 , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4c3a6d , merge_loc_conf = 0x4c3d98 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71e0e0
1: m = 29
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4cbee2 , postconfiguration = 0, create_main_conf = 0x4cbf5f , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4cbfcb , merge_loc_conf = 0x4cc251 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71f360
1: m = 29
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4cbee2 , postconfiguration = 0, create_main_conf = 0x4cbf5f , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4cbfcb , merge_loc_conf = 0x4cc251 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71f360
1: m = 29
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4cbee2 , postconfiguration = 0, create_main_conf = 0x4cbf5f , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4cbfcb , merge_loc_conf = 0x4cc251 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71f360
1: m = 30
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0x4cbee2 , postconfiguration = 0, create_main_conf = 0x4cbf5f , init_main_conf = 0,
  create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0x4cbfcb , merge_loc_conf = 0x4cc251 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x71f360
1: m = 30
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d04bc , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d0528 , merge_loc_conf = 0x4d07f9 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x720600
1: m = 30
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d04bc , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d0528 , merge_loc_conf = 0x4d07f9 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x720600
1: m = 30
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d04bc , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d0528 , merge_loc_conf = 0x4d07f9 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x720600
1: m = 31
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d04bc , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d0528 , merge_loc_conf = 0x4d07f9 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x720600
1: m = 31
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d49ff , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d4a6b , merge_loc_conf = 0x4d4cd3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721360
1: m = 31
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d49ff , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d4a6b , merge_loc_conf = 0x4d4cd3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721360
1: m = 31
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d49ff , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d4a6b , merge_loc_conf = 0x4d4cd3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721360
1: m = 32
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0x4d49ff , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d4a6b , merge_loc_conf = 0x4d4cd3 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721360
1: m = 32
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d7a8f , merge_loc_conf = 0x4d7bfc }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721860
1: m = 32
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d7a8f , merge_loc_conf = 0x4d7bfc }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721860
1: m = 32
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d7a8f , merge_loc_conf = 0x4d7bfc }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721860
1: m = 33
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d7a8f , merge_loc_conf = 0x4d7bfc }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721860
1: m = 33
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f40
1: m = 33
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f40
1: m = 33
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f40
1: m = 34
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f40
1: m = 34
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4d8572 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d85ef , merge_loc_conf = 0x4d8628 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721c60
1: m = 34
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4d8572 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d85ef , merge_loc_conf = 0x4d8628 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721c60
1: m = 34
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4d8572 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d85ef , merge_loc_conf = 0x4d8628 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721c60
1: m = 35
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0x4d8572 , postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4d85ef , merge_loc_conf = 0x4d8628 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x721c60
1: m = 35
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0x4da032 , merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x722000
1: m = 35
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0x4da032 , merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x722000
1: m = 35
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0x4da032 , merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x722000
1: m = 36
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0x4da032 , merge_srv_conf = 0,
  create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x722000
1: m = 36
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f80
1: m = 36
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f80
1: m = 36
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f80
1: m = 37
(gdb)
309            module = cf->cycle->modules[m]->ctx;
4: *module = {preconfiguration = 0, postconfiguration = 0, create_main_conf = 0, init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0, create_loc_conf = 0, merge_loc_conf = 0}
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x736f80
1: m = 37
(gdb)
311            if (module->postconfiguration) {
4: *module = {preconfiguration = 0x4daa87 , postconfiguration = 0x4dab41 ,
  create_main_conf = 0x4da8ce , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4da8f1 , merge_loc_conf = 0x4da965 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x722880
1: m = 37
(gdb)
315                if (module->postconfiguration(cf) != NGX_OK) {
4: *module = {preconfiguration = 0x4daa87 , postconfiguration = 0x4dab41 ,
  create_main_conf = 0x4da8ce , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4da8f1 , merge_loc_conf = 0x4da965 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x722880
1: m = 37
(gdb)
304        for (m = 0; cf->cycle->modules[m]; m++) {
4: *module = {preconfiguration = 0x4daa87 , postconfiguration = 0x4dab41 ,
  create_main_conf = 0x4da8ce , init_main_conf = 0, create_srv_conf = 0, merge_srv_conf = 0,
  create_loc_conf = 0x4da8f1 , merge_loc_conf = 0x4da965 }
3: ngx_http_top_header_filter = (ngx_http_output_header_filter_pt) 0
2: module = (ngx_http_module_t *) 0x722880
1: m = 37
(gdb)
Breakpoint 2, ngx_http_block (cf=0x7fffffffe130, cmd=0x712280, conf=0x766bc0) at src/http/ngx_http.c:305
305            if (cf->cycle->modules[m]->type != NGX_HTTP_MODULE) {
4: *module = {preconfiguration = 0x4daa87 , postconfiguration = 0x4dab41 
相关推荐: 记一次GDB调试nginx运行流程

简介 在nginx源代码中有大量的任务被加到红黑树中,或者通过注册回调函数来实现,通过阅读源码很难发现和跟踪执行流程。但是通过调试nginx代码可以很清晰的跟踪nginx执行的流程,可以很直观的发现一次http请求响应完整处理生命周期。 nginx modul…

最后修改:2021 年 04 月 27 日 06 : 28 PM
如果觉得我的文章对你有用,请随意赞赏