diff --git gdb/orig.machoread.c gdb/machoread.c
index 49cf4fd..2f20b8c 100644
old
|
new
|
macho_add_oso_symfile (oso_el *oso, const gdb_bfd_ref_ptr &abfd, |
421 | 421 | asymbol **symp; |
422 | 422 | struct bfd_hash_table table; |
423 | 423 | int nbr_sections; |
| 424 | const int should_print = (symfile_flags & SYMFILE_VERBOSE) && info_verbose; |
424 | 425 | |
425 | 426 | /* Per section flag to mark which section have been rebased. */ |
426 | 427 | unsigned char *sections_rebased; |
… |
… |
macho_add_oso_symfile (oso_el *oso, const gdb_bfd_ref_ptr &abfd, |
429 | 430 | |
430 | 431 | if (!bfd_check_format (abfd.get (), bfd_object)) |
431 | 432 | { |
432 | | warning (_("`%s': can't read symbols: %s."), oso->name, |
| 433 | if (should_print) warning (_("`%s': can't read symbols: %s."), oso->name, |
433 | 434 | bfd_errmsg (bfd_get_error ())); |
434 | 435 | return; |
435 | 436 | } |
436 | 437 | |
437 | 438 | if (abfd->my_archive == NULL && oso->mtime != bfd_get_mtime (abfd.get ())) |
438 | 439 | { |
439 | | warning (_("`%s': file time stamp mismatch."), oso->name); |
| 440 | if (should_print) warning (_("`%s': file time stamp mismatch."), oso->name); |
440 | 441 | return; |
441 | 442 | } |
442 | 443 | |
… |
… |
macho_symfile_read_all_oso (std::vector<oso_el> *oso_vector_ptr, |
602 | 603 | { |
603 | 604 | int ix; |
604 | 605 | oso_el *oso; |
| 606 | const int should_print = (symfile_flags & SYMFILE_VERBOSE) && info_verbose; |
605 | 607 | |
606 | 608 | /* Sort oso by name so that files from libraries are gathered. */ |
607 | 609 | std::sort (oso_vector_ptr->begin (), oso_vector_ptr->end (), |
… |
… |
macho_symfile_read_all_oso (std::vector<oso_el> *oso_vector_ptr, |
636 | 638 | gnutarget)); |
637 | 639 | if (archive_bfd == NULL) |
638 | 640 | { |
639 | | warning (_("Could not open OSO archive file \"%s\""), |
| 641 | if (should_print) warning (_("Could not open OSO archive file \"%s\""), |
640 | 642 | archive_name.c_str ()); |
641 | 643 | ix = last_ix; |
642 | 644 | continue; |
643 | 645 | } |
644 | 646 | if (!bfd_check_format (archive_bfd.get (), bfd_archive)) |
645 | 647 | { |
646 | | warning (_("OSO archive file \"%s\" not an archive."), |
| 648 | if (should_print) warning (_("OSO archive file \"%s\" not an archive."), |
647 | 649 | archive_name.c_str ()); |
648 | 650 | ix = last_ix; |
649 | 651 | continue; |
… |
… |
macho_symfile_read_all_oso (std::vector<oso_el> *oso_vector_ptr, |
654 | 656 | |
655 | 657 | if (member_bfd == NULL) |
656 | 658 | { |
657 | | warning (_("Could not read archive members out of " |
| 659 | if (should_print) warning (_("Could not read archive members out of " |
658 | 660 | "OSO archive \"%s\""), archive_name.c_str ()); |
659 | 661 | ix = last_ix; |
660 | 662 | continue; |
… |
… |
macho_symfile_read_all_oso (std::vector<oso_el> *oso_vector_ptr, |
691 | 693 | { |
692 | 694 | oso2 = &(*oso_vector_ptr)[ix2]; |
693 | 695 | |
694 | | if (oso2->name != NULL) |
| 696 | if (oso2->name != NULL && should_print) |
695 | 697 | warning (_("Could not find specified archive member " |
696 | 698 | "for OSO name \"%s\""), oso->name); |
697 | 699 | } |
… |
… |
macho_symfile_read_all_oso (std::vector<oso_el> *oso_vector_ptr, |
700 | 702 | else |
701 | 703 | { |
702 | 704 | gdb_bfd_ref_ptr abfd (gdb_bfd_open (oso->name, gnutarget)); |
703 | | if (abfd == NULL) |
704 | | warning (_("`%s': can't open to read symbols: %s."), oso->name, |
| 705 | if (abfd == NULL) { |
| 706 | if (should_print) warning (_("`%s': can't open to read symbols: %s."), oso->name, |
705 | 707 | bfd_errmsg (bfd_get_error ())); |
706 | | else |
| 708 | } else |
707 | 709 | macho_add_oso_symfile (oso, abfd, oso->name, main_objfile, |
708 | 710 | symfile_flags); |
709 | 711 | |