aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-08-16ld/Alan Modra6-82/+115
PR 3052 * ldlang.h (lang_output_section_statement_type): Replace "processed" field with "processed_vma" and "processed_lma". * ldlang.c (lang_do_assignments_1): Move lma setting code.. (lang_size_sections_1): ..to here. (lang_reset_memory_regions): Adjust for lang_output_section_statement_type change. * ldexp.c (fold_name): Likewise. And this is something I forgot the check in from the previous patch. ld/testsuite/ * ld-scripts/overlay-size-map.d: Adjust.
2006-08-16daily updateAlan Modra1-1/+1
2006-08-16*** empty log message ***gdbadmin1-1/+1
2006-08-15 PR remote/1966Daniel Jacobowitz6-495/+331
* dcache.c (dcache_write_line): Use target_write. (dcache_read_line): Use target_read. * mi/mi-main.c (mi_cmd_data_read_memory): Use target_read. * symfile.c (struct load_section_data): Add new per-section members. (load_progress): New function. (load_section_callback): Pass load_progress to the new target_write_with_progress. * target.c (current_xfer_partial, memory_xfer_partial): New. (target_xfer_partial): New prototype. (target_xfer_memory, target_xfer_partial_p, xfer_using_stratum) (do_xfer_memory, target_xfer_memory_partial) (target_read_memory_partial, target_write_memory_partial): Delete. (trust_readonly): Move higher in the file. (update_current_target): Use current_xer_partial. (target_xfer_partial): Use memory_xfer_partial. Handle TARGET_OBJECT_RAW_MEMORY specially. (target_read_memory): Use target_read. (target_write_memory): Use target_write. (default_xfer_partial): Call to_xfer_partial directly. (target_write_with_progress): New function, based on target_write. (target_write): Call it. * target.h (enum target_object): Add TARGET_OBJECT_RAW_MEMORY. (target_write_with_progress): New prototype. (do_xfer_memory, target_read_memory_partial) (target_write_memory_partial): Delete prototypes.
2006-08-15 * elf32-mips.c, elf64-mips.c, elfn32-mips.cThiemo Seufer6-7/+32
(elf_backend_merge_symbol_attribute): Define. * elflink.c (elf_link_add_object_symbols): Merge only the ELF visibility flags. * elfxx-mips.c (_bfd_mips_elf_merge_symbol_attribute): New function.
2006-08-15 [ ChangeLog ]Thiemo Seufer10-4/+50
* config.sub: Add support for sde as alias of mipsisa32-sde-elf. [ bfd/ChangeLog ] * config.bfd: Add configurations for mips*el-sde-elf* and mips*-sde-elf*. [ binutils/testsuite/ChangeLog ] * binutils-all/readelf.exp (readelf_test): Handle mips*-sde-elf*. [ gas/ChangeLog ] * configure.tgt: Handle mips*-sde-elf*. [ gas/testsuite/ChangeLog ] * gas/mips/mips.exp: Handle mips*-sde-elf*.
2006-08-15 * remote.c (remote_write_bytes): Take a const buffer argument.Daniel Jacobowitz3-23/+37
Do the checks from remote_xfer_memory. (remote_read_bytes): Do the checks from remote_xfer_memory. (remote_xfer_memory): Remove checks pushed into lower level functions. (remote_xfer_partial): Call remote_write_bytes and remote_read_bytes directly. * remote.h (remote_write_bytes): Update prototype.
2006-08-15PR binutils/3039Nick Clifton2-1/+6
* wrstabs.c (stab_tag_type): Initialize 'size'.
2006-08-15daily updateAlan Modra1-1/+1
2006-08-15*** empty log message ***gdbadmin1-1/+1
2006-08-14Fix bug 3000Michael Meissner4-11/+65
2006-08-14* elf-m10300.c (elf32_mn10300_link_hash_entry): Add value.DJ Delorie2-12/+107
(elf32_mn10300_count_hash_table_entries): New. (elf32_mn10300_list_hash_table_entries): New. (sort_by_value): New. (mn10300_elf_relax_section): Don't skip data sections; restrict code-specific tests to code-specific areas so that potential indirect calls can be detected. Check for multiple local symbols at the same address and merge their flags. (elf32_mn10300_link_hash_newfunc): Initialize value.
2006-08-14 * elfxx-mips.c (_bfd_mips_elf_symbol_processing,Thiemo Seufer2-0/+8
_bfd_mips_elf_add_symbol_hook): Don't try to place small common TLS symbols in .scommon.
2006-08-14daily updateAlan Modra1-1/+1
2006-08-14*** empty log message ***gdbadmin1-1/+1
2006-08-13daily updateAlan Modra1-1/+1
2006-08-13*** empty log message ***gdbadmin1-1/+1
2006-08-12 [ gas/ChangeLog ]Thiemo Seufer4-2/+11
* config/tc-mips.c (mips16_ip): Fix argument register handling for restore instruction. [ gas/testsuite/ChangeLog ] * gas/mips/mips16-save.d: Fix testcase.
2006-08-12daily updateAlan Modra1-1/+1
2006-08-12*** empty log message ***gdbadmin1-1/+1
2006-08-11 * ld-elfcomm/elfcomm.exp (dump_common1): Extend regexp to match alsoThiemo Seufer2-1/+6
MIPS small commons.
2006-08-11 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): SetThiemo Seufer2-4/+8
sh_entsize only when sgot was already initialized.
2006-08-112006-08-11 Andrew Stubbs <andrew.stubbs@st.com>Andrew Stubbs2-0/+10
* NEWS: Add 'set trace-commands' command.
2006-08-11daily updateAlan Modra1-1/+1
2006-08-11*** empty log message ***gdbadmin1-1/+1
2006-08-102006-08-10 Andrew Stubbs <andrew.stubbs@st.com>Andrew Stubbs4-0/+140
gdb/ * cli/cli-script.c (execute_user_command): Update command_next_depth on user-command call. gdb/testsuite * gdb.base/trace-commands.exp: New file.
2006-08-10 PR binutils/3017Joern Rennecke3-2/+9
* doc/Makefile.am: Use single quotes inside backquotes for date command while generating config.texi. * doc/Makefile.in: Regenerate.
2006-08-10 * gdb.base/step-bt.exp: Make hexadecimal address optional inDaniel Jacobowitz2-2/+8
expected output of the backtrace commands.
2006-08-10 * gdb.arch/altivec-abi.exp: Replace gdb_suppress_entire_file withJoel Brobecker243-349/+944
untested followed by return combination. * gdb.arch/altivec-regs.exp: Likewise. * gdb.arch/e500-abi.exp: Likewise. * gdb.arch/e500-regs.exp: Likewise. * gdb.arch/gdb1291.exp: Likewise. * gdb.arch/gdb1431.exp: Likewise. * gdb.arch/gdb1558.exp: Likewise. * gdb.arch/i386-prologue.exp: Likewise. * gdb.arch/i386-unwind.exp: Likewise. * gdb.asm/asm-source.exp: Likewise. * gdb.base/a2-run.exp: Likewise. * gdb.base/advance.exp: Likewise. * gdb.base/all-bin.exp: Likewise. * gdb.base/annota1.exp: Likewise. * gdb.base/annota3.exp: Likewise. * gdb.base/args.exp: Likewise. * gdb.base/arithmet.exp: Likewise. * gdb.base/assign.exp: Likewise. * gdb.base/async.exp: Likewise. * gdb.base/attach.exp: Likewise. * gdb.base/bang.exp: Likewise. * gdb.base/bigcore.exp: Likewise. * gdb.base/bitfields.exp: Likewise. * gdb.base/bitfields2.exp: Likewise. * gdb.base/break.exp: Likewise. * gdb.base/call-sc.exp: Likewise. * gdb.base/call-strs.exp: Likewise. * gdb.base/callfuncs.exp: Likewise. * gdb.base/checkpoint.exp: Likewise. * gdb.base/chng-syms.exp: Likewise. * gdb.base/code-expr.exp: Likewise. * gdb.base/commands.exp: Likewise. * gdb.base/completion.exp: Likewise. * gdb.base/cond-expr.exp: Likewise. * gdb.base/condbreak.exp: Likewise. * gdb.base/consecutive.exp: Likewise. * gdb.base/constvars.exp: Likewise. * gdb.base/corefile.exp: Likewise. * gdb.base/cvexpr.exp: Likewise. * gdb.base/dbx.exp: Likewise. * gdb.base/define.exp: Likewise. * gdb.base/detach.exp: Likewise. * gdb.base/display.exp: Likewise. * gdb.base/dump.exp: Likewise. * gdb.base/ena-dis-br.exp: Likewise. * gdb.base/ending-run.exp: Likewise. * gdb.base/environ.exp: Likewise. * gdb.base/eval-skip.exp: Likewise. * gdb.base/exprs.exp: Likewise. * gdb.base/fileio.exp: Likewise. * gdb.base/finish.exp: Likewise. * gdb.base/float.exp: Likewise. * gdb.base/foll-exec.exp: Likewise. * gdb.base/foll-fork.exp: Likewise. * gdb.base/foll-vfork.exp: Likewise. * gdb.base/freebpcmd.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/gcore.exp: Likewise. * gdb.base/gdb1090.exp: Likewise. * gdb.base/gdb1250.exp: Likewise. * gdb.base/huge.exp: Likewise. * gdb.base/info-proc.exp: Likewise. * gdb.base/interrupt.exp: Likewise. * gdb.base/jump.exp: Likewise. * gdb.base/langs.exp: Likewise. * gdb.base/lineinc.exp: Likewise. * gdb.base/list.exp: Likewise. * gdb.base/logical.exp: Likewise. * gdb.base/long_long.exp: Likewise. * gdb.base/macscp.exp: Likewise. * gdb.base/maint.exp: Likewise. * gdb.base/mips_pro.exp: Likewise. * gdb.base/miscexprs.exp: Likewise. * gdb.base/multi-forks.exp: Likewise. * gdb.base/opaque.exp: Likewise. * gdb.base/overlays.exp: Likewise. * gdb.base/pc-fp.exp: Likewise. * gdb.base/pointers.exp: Likewise. * gdb.base/printcmds.exp: Likewise. * gdb.base/psymtab.exp: Likewise. * gdb.base/ptype.exp: Likewise. * gdb.base/recurse.exp: Likewise. * gdb.base/relational.exp: Likewise. * gdb.base/relocate.exp: Likewise. * gdb.base/remote.exp: Likewise. * gdb.base/reread.exp: Likewise. * gdb.base/restore.exp: Likewise. * gdb.base/return.exp: Likewise. * gdb.base/return2.exp: Likewise. * gdb.base/scope.exp: Likewise. * gdb.base/sect-cmd.exp: Likewise. * gdb.base/sep.exp: Likewise. * gdb.base/sepdebug.exp: Likewise. * gdb.base/setshow.exp: Likewise. * gdb.base/setvar.exp: Likewise. * gdb.base/sigall.exp: Likewise. * gdb.base/sigbpt.exp: Likewise. * gdb.base/signals.exp: Likewise. * gdb.base/signull.exp: Likewise. * gdb.base/sizeof.exp: Likewise. * gdb.base/solib.exp: Likewise. * gdb.base/step-line.exp: Likewise. * gdb.base/step-test.exp: Likewise. * gdb.base/structs.exp: Likewise. * gdb.base/structs2.exp: Likewise. * gdb.base/term.exp: Likewise. * gdb.base/twice.exp: Likewise. * gdb.base/until.exp: Likewise. * gdb.base/varargs.exp: Likewise. * gdb.base/volatile.exp: Likewise. * gdb.base/watchpoint.exp: Likewise. * gdb.base/whatis-exp.exp: Likewise. * gdb.base/whatis.exp: Likewise. * gdb.cp/ambiguous.exp: Likewise. * gdb.cp/annota2.exp: Likewise. * gdb.cp/annota3.exp: Likewise. * gdb.cp/bool.exp: Likewise. * gdb.cp/breakpoint.exp: Likewise. * gdb.cp/casts.exp: Likewise. * gdb.cp/class2.exp: Likewise. * gdb.cp/classes.exp: Likewise. * gdb.cp/cplusfuncs.exp: Likewise. * gdb.cp/ctti.exp: Likewise. * gdb.cp/derivation.exp: Likewise. * gdb.cp/exception.exp: Likewise. * gdb.cp/gdb1355.exp: Likewise. * gdb.cp/hang.exp: Likewise. * gdb.cp/inherit.exp: Likewise. * gdb.cp/local.exp: Likewise. * gdb.cp/m-data.exp: Likewise. * gdb.cp/m-static.exp: Likewise. * gdb.cp/member-ptr.exp: Likewise. * gdb.cp/method.exp: Likewise. * gdb.cp/misc.exp: Likewise. * gdb.cp/namespace.exp: Likewise. * gdb.cp/overload.exp: Likewise. * gdb.cp/ovldbreak.exp: Likewise. * gdb.cp/pr-1023.exp: Likewise. * gdb.cp/pr-1210.exp: Likewise. * gdb.cp/pr-574.exp: Likewise. * gdb.cp/printmethod.exp: Likewise. * gdb.cp/psmang.exp: Likewise. * gdb.cp/ref-params.exp: Likewise. * gdb.cp/ref-types.exp: Likewise. * gdb.cp/rtti.exp: Likewise. * gdb.cp/templates.exp: Likewise. * gdb.cp/try_catch.exp: Likewise. * gdb.cp/userdef.exp: Likewise. * gdb.cp/virtfunc.exp: Likewise. * gdb.disasm/am33.exp: Likewise. * gdb.disasm/h8300s.exp: Likewise. * gdb.disasm/mn10300.exp: Likewise. * gdb.disasm/sh3.exp: Likewise. * gdb.disasm/t01_mov.exp: Likewise. * gdb.disasm/t02_mova.exp: Likewise. * gdb.disasm/t03_add.exp: Likewise. * gdb.disasm/t04_sub.exp: Likewise. * gdb.disasm/t05_cmp.exp: Likewise. * gdb.disasm/t06_ari2.exp: Likewise. * gdb.disasm/t07_ari3.exp: Likewise. * gdb.disasm/t08_or.exp: Likewise. * gdb.disasm/t09_xor.exp: Likewise. * gdb.disasm/t10_and.exp: Likewise. * gdb.disasm/t11_logs.exp: Likewise. * gdb.disasm/t12_bit.exp: Likewise. * gdb.disasm/t13_otr.exp: Likewise. * gdb.hp/gdb.aCC/optimize.exp: Likewise. * gdb.hp/gdb.aCC/watch-cmd.exp: Likewise. * gdb.hp/gdb.base-hp/callfwmall.exp: Likewise. * gdb.hp/gdb.base-hp/dollar.exp: Likewise. * gdb.hp/gdb.base-hp/hwwatchbus.exp: Likewise. * gdb.hp/gdb.base-hp/pxdb.exp: Likewise. * gdb.hp/gdb.base-hp/reg-pa64.exp: Likewise. * gdb.hp/gdb.base-hp/reg.exp: Likewise. * gdb.hp/gdb.base-hp/sized-enum.exp: Likewise. * gdb.hp/gdb.compat/xdb1.exp: Likewise. * gdb.hp/gdb.compat/xdb3.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg01.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg02.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg03.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg04.exp: Likewise. * gdb.mi/gdb701.exp: Likewise. * gdb.mi/gdb792.exp: Likewise. * gdb.mi/mi-basics.exp: Likewise. * gdb.mi/mi-break.exp: Likewise. * gdb.mi/mi-cli.exp: Likewise. * gdb.mi/mi-console.exp: Likewise. * gdb.mi/mi-disassemble.exp: Likewise. * gdb.mi/mi-eval.exp: Likewise. * gdb.mi/mi-file.exp: Likewise. * gdb.mi/mi-read-memory.exp: Likewise. * gdb.mi/mi-regs.exp: Likewise. * gdb.mi/mi-return.exp: Likewise. * gdb.mi/mi-simplerun.exp: Likewise. * gdb.mi/mi-stack.exp: Likewise. * gdb.mi/mi-stepi.exp: Likewise. * gdb.mi/mi-syn-frame.exp: Likewise. * gdb.mi/mi-until.exp: Likewise. * gdb.mi/mi-var-block.exp: Likewise. * gdb.mi/mi-var-child.exp: Likewise. * gdb.mi/mi-var-cmd.exp: Likewise. * gdb.mi/mi-var-display.exp: Likewise. * gdb.mi/mi-watch.exp: Likewise. * gdb.mi/mi2-basics.exp: Likewise. * gdb.mi/mi2-break.exp: Likewise. * gdb.mi/mi2-cli.exp: Likewise. * gdb.mi/mi2-console.exp: Likewise. * gdb.mi/mi2-disassemble.exp: Likewise. * gdb.mi/mi2-eval.exp: Likewise. * gdb.mi/mi2-file.exp: Likewise. * gdb.mi/mi2-read-memory.exp: Likewise. * gdb.mi/mi2-regs.exp: Likewise. * gdb.mi/mi2-return.exp: Likewise. * gdb.mi/mi2-simplerun.exp: Likewise. * gdb.mi/mi2-stack.exp: Likewise. * gdb.mi/mi2-stepi.exp: Likewise. * gdb.mi/mi2-syn-frame.exp: Likewise. * gdb.mi/mi2-until.exp: Likewise. * gdb.mi/mi2-var-block.exp: Likewise. * gdb.mi/mi2-var-child.exp: Likewise. * gdb.mi/mi2-var-cmd.exp: Likewise. * gdb.mi/mi2-var-display.exp: Likewise. * gdb.mi/mi2-watch.exp: Likewise. * gdb.stabs/exclfwd.exp: Likewise. * gdb.stabs/weird.exp: Likewise. * gdb.threads/gcore-thread.exp: Likewise. * gdb.trace/actions.exp: Likewise. * gdb.trace/backtrace.exp: Likewise. * gdb.trace/circ.exp: Likewise. * gdb.trace/collection.exp: Likewise. * gdb.trace/deltrace.exp: Likewise. * gdb.trace/infotrace.exp: Likewise. * gdb.trace/limits.exp: Likewise. * gdb.trace/packetlen.exp: Likewise. * gdb.trace/passc-dyn.exp: Likewise. * gdb.trace/passcount.exp: Likewise. * gdb.trace/report.exp: Likewise. * gdb.trace/save-trace.exp: Likewise. * gdb.trace/tfind.exp: Likewise. * gdb.trace/tracecmd.exp: Likewise. * gdb.trace/while-dyn.exp: Likewise. * gdb.trace/while-stepping.exp: Likewise.
2006-08-10daily updateAlan Modra1-1/+1
2006-08-10*** empty log message ***gdbadmin1-1/+1
2006-08-09 * NEWS: Add entry for new substitute-path commands.Joel Brobecker2-0/+14
2006-08-092006-08-08 Peter S. Mazinger <ps.m@gmx.net>Mike Frysinger2-1/+6
* emulparams/armelf.sh (MAXPAGESIZE): Changed to "CONSTANT (MAXPAGESIZE)".
2006-08-09daily updateAlan Modra1-1/+1
2006-08-09*** empty log message ***gdbadmin1-1/+1
2006-08-08 * gdb.texinfo (Source Path): Add documentation for newJoel Brobecker2-0/+107
substitute-path commands.
2006-08-08 * source.c: #include gdb_assert.h.Joel Brobecker3-2/+365
(substitute_path_rule): New struct. (substitute_path_rules): New static global variable. (substitute_path_rule_matches): New function. (get_substitute_path_rule): New function. (rewrite_source_path): New function. (find_and_open_source): Add source path rewriting support. (strip_trailing_directory_separator): New function. (find_substitute_path_rule): New function. (add_substitute_path_rule): New function. (delete_substitute_path_rule): New function. (show_substitute_path_command): New function. (unset_substitute_path_command): New function. (set_substitute_path_command): New function. (_initialize_source): Add new substitute-path commands. * Makefile.in (source.o): Add dependency on gdb_assert.h.
2006-08-08 * gdb.base/step-bt.c: New file.Joel Brobecker3-0/+117
* gdb.base/step-bt.exp: New testcase.
2006-08-08 * i386-tdep.c (i386_follow_jump): Use read_memory_nobpt to readJoel Brobecker2-13/+24
instructions. (i386_analyze_struct_return): Likewise. (i386_skip_probe): Likewise. (i386_match_insn): Likewise. (i386_analyze_frame_setup): Likewise. (i386_analyze_register_saves): Likewise. (i386_skip_prologue): Likewise.
2006-08-08 * gdbcore.h (read_memory_nobpt): New function name instead ofJoel Brobecker13-29/+47
deprecated_read_memory_nobpt. * breakpoint.c (read_memory_nobpt): New function name instead of deprecated_read_memory_nobpt. Adjust calls to old deprecated_read_memory_nobpt accordingly. * alpha-tdep.c: Adjust calls to deprecated_read_memory_nobpt accordingly. * alphanbsd-tdep.c: Likewise. * frame.c: Likewise. * frv-tdep.c: Likewise. * hppa-linux-tdep.c: Likewise. * hppa-tdep.c: Likewise. * i386-linux-nat.c: Likewise. * m68klinux-tdep.c: Likewise. * mips-tdep.c: Likewise. * s390-tdep.c: Likewise.
2006-08-08Commit missed files from last patch.Daniel Jacobowitz2-85/+738
2006-08-08gdb/Daniel Jacobowitz7-9/+76
* configure.ac: Check for expat. * acinclude.m4: Include AC_LIB_HAVE_LINKFLAGS dependencies. * Makefile.in (LIBEXPAT): New. (CLIBS): Include $(LIBEXPAT). * README: Mention expat. * configure, config.in: Regenerated. gdb/doc/ * gdb.texinfo (Installing GDB): Update menu. Move text to... (Running Configure): ...here. (Requirements): New node. Mention expat.
2006-08-08gas/ChangeLog:Bob Wilson6-2/+126
* dwarf2dbg.c (DWARF2_USE_FIXED_ADVANCE_PC): New. (out_sleb128): New. (out_fixed_inc_line_addr): New. (process_entries): Use out_fixed_inc_line_addr when DWARF2_USE_FIXED_ADVANCE_PC is set. * config/tc-xtensa.h (DWARF2_USE_FIXED_ADVANCE_PC): Define. gas/testsuite/ChangeLog: * gas/lns/lns-common-1-alt.d: New file. * gas/lns/lns.exp: Use lns-common-1-alt.d for xtensa targets.
2006-08-08gdb/Daniel Jacobowitz9-3/+43
* config/sparc/embed.mt: New file. * configure.tgt (sparc-*-rtems*): Use embed.mt. sim/ * configure.ac (sparc-*-rtems*|sparc-*-elf*): Enable erc32 simulator. * Makefile.in (FLAGS_TO_PASS): Include libdir. * configure: Regenerated. sim/erc32/ * Makefile.in (func.o, help.o): Correct dependencies. * Makefile.in (install-sis): Honor DESTDIR.
2006-08-08 * Makefile.in (objfiles.o, symfile.o): Update.Daniel Jacobowitz4-2/+28
* objfiles.c: Include "expression.h" and "parser-defs.h". (free_objfile): Clear global blocks. * symfile.c: Include "parser-defs.h". (clear_symtab_users): Clear global blocks.
2006-08-08* elf32-sh.c (sh_elf_relax_section): Allow for branches acrossDJ Delorie2-1/+17
non-moving .align directives. Preserve any DIR32 offset when converting bsr's to jsr's.
2006-08-08* config/tc-sh.c (sh_frob_section): Canonicalize pointers to localDJ Delorie2-0/+21
vs full symbols so that we never have more than one pointer value for any given symbol in our symbol table.
2006-08-082006-08-08 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu3-13/+29
PR ld/3006 * ldlang.c (lang_section_bst_type): Moved to ... * ldlang.h: Here. * ldlang.h (lang_wild_statement_struct): Add a tree field. * ldlang.c (wild_sort_fast): Use the tree field for BST. (wild): Likeise. (analyze_walk_wild_section_handler): Initialize the tree field.
2006-08-08 * breakpoint.c (update_breakpoints_after_exec): Fix type mismatch.Thiemo Seufer2-2/+6
2006-08-08gdb/gdbserver/Richard Sandiford2-1/+29
* server.c (terminal_fd): New variable. (old_foreground_pgrp): Likewise. (restore_old_foreground_pgrp): New function. (start_inferior): Record the terminal file descriptor in terminal_fd and its original foreground group in old_foreground_pgrp. Register restore_old_foreground_pgrp with atexit().