{"push_id":1263292638,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"d9de1fe3d5607f96491e8f16f474b9441cbec849","before":"e9d9abd7470ea500eb4e82567fff68e87a30efb9","commits":[{"sha":"38334d6de448272c3bd831e3410dbc337fc2739d","author":{"name":"Nick Clifton","email":"d22ea499f82b201eae54096af285f8bf7349fed4@redhat.com"},"message":"Better fix for PR 20499, including preventing strlen from being called on an uninitialised name field.\n\n\tPR gprof/20499\n\t* corefile.c (BUFSIZE): Define.\n\t(STR_BUFSIZE): Define.\n\t(read_function_mappings): Use BUFSIZE and STR)BUFSIZE.\n\t(num_of_syms_in): Move buf, address and name arrays out of\n\tfunction and declare as static BUFSIZE arrays.\n\tUse STR_BUFSIZE when scanning for name and address.\n\t(core_create_syms_from): Revert previous delta.  Instead\n\tshort circuit the parsing of a symbol if all three fields\n\tcould not be found.","distinct":true,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/38334d6de448272c3bd831e3410dbc337fc2739d"},{"sha":"d9de1fe3d5607f96491e8f16f474b9441cbec849","author":{"name":"Pedro Alves","email":"4ab1b1e93a96e2379fea7b286ce33d45682708c9@redhat.com"},"message":"Fix PR20494 - User input stops being echoed in CLI\n\nThis patch fixes a problem that problem triggers if you start an\ninferior, e.g., with the \"start\" command, in a UI created with the\nnew-ui command, and then run a foreground execution command in the\nmain UI.  Once the program stops for the latter command, typing in the\nmain UI no longer echoes back to the user.\n\nThe problem revolves around this:\n\n- gdb_has_a_terminal computes its result lazily, on first call.\n\n  that is what saves gdb's initial main UI terminal state (the UI\n  associated with stdin):\n\n          our_terminal_info.ttystate = serial_get_tty_state (stdin_serial);\n\n  This is the state that target_terminal_ours() restores.\n\n- In this scenario, the gdb_has_a_terminal function happens to be\n  first ever called from within the target_terminal_init call in\n  startup_inferior:\n\n      (top-gdb) bt\n      #0  gdb_has_a_terminal () at src/gdb/inflow.c:157\n      #1  0x000000000079db22 in child_terminal_init_with_pgrp () at src/gdb/inflow.c:217\n       [...]\n      #4  0x000000000065bacb in target_terminal_init () at src/gdb/target.c:456\n      #5  0x00000000004676d2 in startup_inferior () at src/gdb/fork-child.c:531\n       [...]\n      #7  0x000000000046b168 in linux_nat_create_inferior () at src/gdb/linux-nat.c:1112\n       [...]\n      #9  0x00000000005f20c9 in start_command (args=0x0, from_tty=1) at src/gdb/infcmd.c:657\n\nIf the command to start the inferior is issued on the main UI, then\nreadline will have deprepped the terminal when we reach the above, and\nthe problem doesn't appear.\n\nIf however the command is issued on a non-main UI, then when we reach\nthat gdb_has_a_terminal call, the main UI's terminal state is still\nset to whatever readline has sets it to in rl_prep_terminal, which\nhappens to have echo disabled.  Later, when the following synchronous\nexecution command finishes, we'll call target_terminal_ours to restore\ngdb's the main UI's terminal settings, and that restores the terminal\nstate with echo disabled...\n\nConceptually, the fix is to move the gdb_has_a_terminal call earlier,\nto someplace during GDB initialization, before readline/ncurses have\nhad a chance to change terminal settings.  Turns out that\n\"set_initial_gdb_ttystate\" is exactly such a place.\n\nI say conceptually, because the fix actually inlines the\ngdb_has_a_terminal part that saves the terminal state in\nset_initial_gdb_ttystate and then simplifies gdb_has_a_terminal, since\nthere's no point in making gdb_has_a_terminal do lazy computation.\n\ngdb/ChangeLog:\n2016-08-23  Pedro Alves  <palves@redhat.com>\n\n\tPR gdb/20494\n\t* inflow.c (our_terminal_info, initial_gdb_ttystate): Update\n\tcomments.\n\t(enum gdb_has_a_terminal_flag_enum, gdb_has_a_terminal_flag):\n\tDelete.\n\t(set_initial_gdb_ttystate): Record our_terminal_info here too,\n\tinstead of ...\n\t(gdb_has_a_terminal): ... here.  Reimplement in terms of\n\tinitial_gdb_ttystate.  Make static.\n\t* terminal.h (gdb_has_a_terminal): Delete declaration.\n\t(set_initial_gdb_ttystate): Add comment.\n\t* top.c (show_interactive_mode): Use input_interactive_p instead\n\tof gdb_has_a_terminal.\n\ngdb/testsuite/ChangeLog:\n2016-08-23  Pedro Alves  <palves@redhat.com>\n\n\tPR gdb/20494\n\t* gdb.base/new-ui-echo.c: New file.\n\t* gdb.base/new-ui-echo.exp: New file.","distinct":true,"url":"https://api.github.com/repos/kraj/binutils-gdb/commits/d9de1fe3d5607f96491e8f16f474b9441cbec849"}]}
{"actor":{"display_login":"kraj"}}