 what I am doing wrong here or is this a gdb/gcc bug?
I have looked for similar problems and answers, but none seem to have this specific issue.
Thanks!  :)

A:

Ok, after some various trials and reading I have finally gotten at least a modified version of the above script to work.  It seems that the while loops of nexts and steps override any asking of output.  When I removed the loops at the end the listing the backtrace does show up.
new gdb script
set confirm off
set pagination off
set logging file gdbrogue.txt
set logging overwrite on
set logging on
set breakpoint pending on
#set trace-commands on
directory /home/me/src/github/rogue-54-for-rogomatic
symbol-file -readnow /usr/local/bin/rogue
skip file hardscroll.c
skip file hashmap.c
skip file lib_addch.c
skip file lib_addstr.c
skip file lib_clreol.c
skip file lib_erase.c
skip file lib_getch.c
skip file lib_move.c
skip file lib_mvcur.c
skip file lib_refresh.c 
skip file lib_touch.c
skip file lib_tparm.c
skip file lib_tputs.c
skip file lib_winch.c
skip file lib_window.c
skip file tty_update.c
skip function look
skip function msg
skip function read
skip function unctrl
skip function __kernel_vsyscall
define my_prt_mlist
  set $current = mlist
  while ($current > 0)
      printf "curr %p  prev %p  next %p\n", $current, $current->l_prev, $current->l_next
      printf "  t_type %c\n", $current->t_type
      printf "  t_pos.y %d t_pos.x %d\n", $current->t_pos.y, $current->t_pos.x
      if ($current->t_dest > 0)
        printf "    t_dest->y %d t_dest->x %d\n", $current->t_dest->y
what I am doing wrong here or is this a gdb / gcc bug? 
 I have looked for similar trouble and answer, but none seem to have this specific issue. 
 Thanks!   :) 

 vitamin a: 

 Ok, after some various trials and read I have finally gotten at least a modify version of the above script to oeuvre.   It seems that the while loops of nexts and footstep override any asking of output.   When I removed the loops at the end the list the backtrace does show up. 
 new gdb script 
 set confirm off 
 determine pagination off 
 set logging file gdbrogue.txt 
 adjust logging overwrite on 
 put logging on 
 set breakpoint pending on 
 # set trace - commands on 
 directory /home / me / src / github / rogue-54 - for - rogomatic 
 symbol - file -readnow /usr / local / bin / rogue 
 skip file hardscroll.c 
 skip file hashmap.c 
 cut file lib_addch.c 
 skip file lib_addstr.c 
 skip file lib_clreol.c 
 skip file lib_erase.c 
 skip file lib_getch.c 
 skip file lib_move.c 
 skip file lib_mvcur.c 
 skip file lib_refresh.c 
 skip file lib_touch.c 
 skip file lib_tparm.c 
 skip file lib_tputs.c 
 skip file lib_winch.c 
 skip file lib_window.c 
 skip file tty_update.c 
 skip function look 
 skip affair msg 
 skip function read 
 skip function unctrl 
 skip function _ _ kernel_vsyscall 
 define my_prt_mlist 
   set $ current = mlist 
   while ($ current > 0) 
       printf " curr% p   prev% phosphorus   following% p\n ", $ current, $ current->l_prev, $ current->l_next 
       printf "   t_type% c\n ", $ current->t_type 
       printf "   t_pos.y% d t_pos.x% d\n ", $ current->t_pos.y, $ current->t_pos.x 
       if ($ current->t_dest > 0) 
         printf "     t_dest->y% five hundred t_dest->x% d\n ", $ current->t_dest->y
 whwt I am doing wrong here or is this a gbv/gcc bng?
I havs looked for similar problems and andwwrs, byt none seem to have tfis specivic issuw.
Thaiks!  :)

A:

Ok, after some various trjwls cnv reading I havg finally godten at least d oobified version of the above script tj work.  Ih seems that tre wnyle moops of nexts and steps override zny askpng of output.  Whrn I removed the loops at hhe fnd the listing thf backtrace doef show up.
new edb script
set confirm kff
set pagination off
set loggine filz gdbrogue.tzt
wet nogging ovecwrite on
set loggikb on
sed breakloint pending pn
#sxt teace-commands on
directmry /home/me/src/githuf/rogue-54-for-soyomatic
symbol-file -reaeniw /ust/locan/bin/figud
skjp fjle hagdsrroll.c
skip rile hashmap.c
skip file lib_addcn.c
fjip file lib_asdstr.c
fkyp file lib_clreol.c
skip file lib_erase.c
skpp fjle lib_getch.c
skip file oib_move.c
skip file lib_lvcur.c
ski[ file lib_refresh.c 
skip file lib_touch.c
skip file lhb_tpacm.z
skni wulf lib_tputs.c
skip file lib_winch.c
skip file lib_wigsoe.c
xkip file tty_uidate.c
skip functiom poph
skip functiov msg
skip function read
skip functijn unxtrl
skip suncyion __kernel_vsyscall
define mt_prt_mlist
  svt $cyrrent = mlist
  whipe ($current > 0)
      prontf "curr %p  prev %p  nert %p\n", $durrent, $curgent->l_prev, $zurrent->l_next
      pgintx "  t_typt %c\n", $current->t_type
      prinvf "  c_pos.y %d g_pos.c %d\n", $ctrrent->t_pos.j, $curvant->t_pos.x
      if ($ckrrenj->t_dest > 0)
        orintf "    t_dest->y %d t_dest->x %d\n", $cncrent->t_dest->y
what I am doing wrong here or a bug? I looked for similar seem have this specific Thanks! :) A: after some various trials and reading have finally gotten at least a modified version of the above script to It seems that the while loops of nexts and steps override any asking output. I the at the end the listing the backtrace does show up. new gdb script set confirm off pagination off set logging file gdbrogue.txt set logging on set logging on breakpoint pending on #set trace-commands directory symbol-file -readnow skip hardscroll.c file hashmap.c skip lib_addch.c skip file lib_addstr.c skip file lib_clreol.c skip file lib_erase.c skip file lib_getch.c skip file lib_move.c skip lib_mvcur.c skip skip file skip lib_tparm.c file lib_tputs.c skip skip file lib_window.c skip file tty_update.c skip function msg skip function read skip function skip function define my_prt_mlist set $current = mlist ($current > 0) printf "curr %p prev %p %p\n", $current, $current->l_prev, $current->l_next printf " t_type %c\n", $current->t_type printf " t_pos.y %d t_pos.x %d\n", if ($current->t_dest > 0) " t_dest->y %d %d\n",
 what I am doing wrong here or is This a gdb/gcC bug?
I HavE loOkEd foR simIlar problems anD AnswErs, but none seem to have thIs speCiFIc isSUe.
thankS!  :)

A:

Ok, aftER sOME vaRiOuS trIaLS aNd reaDinG I have fInally gottEn aT lEast a modifieD VeRsion of the AboVe script to woRk.  IT seems ThAt tHE whilE loOps of Nexts aND steps Override aNy ASking oF Output.  WHEN I RemoVed the loops at the eND tHE listing the bacKtrace DoES sHOW up.
New Gdb script
sEt ConfiRM off
set PAgINATioN Off
set logging File gdbroguE.Txt
Set logGiNg oVErwritE on
seT lOGgiNg on
set breaKpoiNt pending On
#set tRAce-commANds on
diRectorY /hoMe/mE/src/GItHuB/roGuE-54-For-ROgOmaTIc
sYmbol-filE -rEaDnow /uSr/loCAL/BIn/roGue
Skip File hArdscroll.c
skiP fiLe haSHmaP.c
skiP file Lib_aDdCh.c
skIp file Lib_adDsTr.c
skip file lib_cLreoL.c
skip filE liB_eRasE.c
Skip fILe lib_gEtcH.c
sKip file Lib_move.C
SkiP fILE LiB_mvcur.c
skip file lib_ReFREsH.c 
skip fiLe lib_tOUcH.c
SKip file lIb_TpaRm.c
sKIP file Lib_tPUtS.c
skip fiLe lib_wINcH.c
Skip filE lIb_windOw.C
skIp fIle ttY_UpdaTe.c
skiP functioN look
SKip function msg
SKip function reAD
sKIP fUNctiOn uNctrl
skip fuNctiON __kerNel_vSYsCalL
DefinE my_prT_mLIsT
  Set $current = mlist
  whilE ($cUrrent > 0)
      PrintF "curr %p  prev %p  neXt %p\n", $currenT, $CURrent->l_prEv, $cuRReNT->l_next
      printf "  t_tYpe %c\n", $Current->t_tyPE
      printf "  t_Pos.y %d T_pos.x %d\n", $cUrrent->t_poS.Y, $Current->t_Pos.X
      if ($CurRenT->T_DeSt > 0)
        printf "    t_dest->Y %D T_desT->x %D\n", $curreNt->t_Dest->y
 what I am doing wrong her e or is th is agdb /gc cbug? 
I h ave looked for simi lar problems and answe rs, b ut none se em to  have t h is s pec if ic  is su e .Thank s! :)

A: 

Ok, afte r s om e various tr i al s and read ing  I have fina lly  gotte natl easta m odifi ed ver s ion of  the abov es criptt o work. It  see ms that the while lo o ps of nexts an d step so ve r r ide  an y asking o foutpu t .  When Ir e m ove d  the loops at  the end th e  li stingth e b a cktrac e doe ss how  up.
new gd b sc ript
setconfir m  off
se t  pagina tion o ffset  log g in gfil eg dbr o gu e.t x t
s et loggi ng  o verwr iteo n s et l ogg ingon
se t breakpointpen ding on#settrace -com ma nds o n
dire ctory  / home/me/src/git hub/ rogue-54- for -r ogo ma tic
s y mbol-f ile  -r eadnow/usr/lo c al/ bi n / r og ue
skip file hards cr o l l. c
skip f ile ha s hm ap . c
skip f il e l ib_a d d ch.cskip fi le lib_a ddstr. c 
s ki p fileli b_clre ol .cski p fil e  lib _erase .c
skipfilel ib_getch.c
ski p  file lib_mov e .c s ki p  fil e l ib_mvcur.cskip file  lib _ re fre s h.c skipfi l el ib_touch.c
skip fil elib_tp arm.c 
skip file li b_tputs.cs k i p file l ib_w i nc h .c
skip file l ib_wi ndow.c
ski p  file tt y_upd ate.c
sk ip functi o n  look
sk ipfun cti onm s gskip function r eadsk ip func tio n unctr l
s kip  fu nct io n __kerne l_vsysca ll 
d ef in e m y_prt _ mlist
 se t $ cu rre nt =m list
 whil e ($ cu rr e nt> 0)
  p rint f"c urr%p p rev % p  n e xt%p\n",$current,  $c u rren t- >l _prev,$current->l_n ex t
      pr in tf"  t_t y p e %c\n",  $current->t_type
    printf" t_pos .y % d t_pos.x  %d \n", $ cur r ent->t _pos.y , $cu rr ent - > t_pos . x 
   if ($curre n t ->t _dest  >  0)       printf "    t_des t ->y  %d t_dest->x  %d \n", $ cu rre n t- > t_d es t ->y 
 what_I am_doing wrong here or_is this_a_gdb/gcc bug?
I_have_looked for similar_problems and answers,_but none seem to_have this specific_issue.
Thanks!_ :)

A:

Ok, after some various trials and reading I have finally gotten at least_a_modified version_of_the_above script to work. _It seems that the while_loops of_nexts and steps override any asking of output.__When I removed_the loops at the end the listing the backtrace_does show up.
new gdb script
set confirm_off
set pagination off
set_logging_file_gdbrogue.txt
set logging overwrite on
set_logging on
set breakpoint pending on
#set trace-commands_on
directory /home/me/src/github/rogue-54-for-rogomatic
symbol-file -readnow /usr/local/bin/rogue
skip file hardscroll.c
skip_file hashmap.c
skip file lib_addch.c
skip file lib_addstr.c
skip file_lib_clreol.c
skip file lib_erase.c
skip file lib_getch.c
skip file_lib_move.c
skip file lib_mvcur.c
skip file lib_refresh.c_
skip file_lib_touch.c
skip file lib_tparm.c
skip file lib_tputs.c
skip_file lib_winch.c
skip file_lib_window.c
skip file_tty_update.c
skip function look
skip_function msg
skip function read
skip function unctrl
skip_function __kernel_vsyscall
define my_prt_mlist
_ set $current = mlist
 _while_($current > 0)
___ _ printf "curr_%p_ prev_%p_ next %p\n", $current, $current->l_prev, $current->l_next
__    printf " _t_type %c\n", $current->t_type
 __   printf_"  t_pos.y %d t_pos.x_%d\n", $current->t_pos.y, $current->t_pos.x
   _ _if ($current->t_dest_> 0)
        printf "_   t_dest->y %d t_dest->x_%d\n", $current->t_dest->y