Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!kodak!ispd-newsserver!garden.ssd.kodak.com!weimer From: weimer@garden.ssd.kodak.com (Gary Weimer (253-7796)) Newsgroups: comp.unix.misc Subject: Re: Can anyone make helpful suggestion? Message-ID: <1991May3.154301.26017@ssd.kodak.com> Date: 3 May 91 15:43:01 GMT References: <1991May2.133654.9953@gpu.utcs.utoronto.ca> Sender: news@ssd.kodak.com Reply-To: weimer@ssd.kodak.com Organization: Eastman Kodak Co.; Rochester, NY Lines: 33 In article <1991May2.133654.9953@gpu.utcs.utoronto.ca>, pindor@gpu.utcs.utoronto.ca (Andrzej Pindor) writes: |> |> I am trying to debug a C program on a Sun 3/60 using dbxtool. I keep getting |> these strange messages: |> |> Reading symbolic information... |> Read 1177 symbols |> program terminated by signal BUS (hardware error) |> (dbxtool) |> |> (dbxtool) cont |> signal SEGV (no mapping at the fault address) in init_draw at line 489 in file "tile1.c" |> (dbxtool) |> |> Can anyone please suggest either what causes the problem or how to look for |> the cause? try looking at line 489 in the file tile1.c (inside the function init_draw). Most likely this uses a pointer which points to an invalid address (hence the Segmentation Violation--SEGV). To find out how you got to that function, you can try using the where command in dbxtool. Unless the bug in your code has corrupted the stack space, this will give a list of the functions called in reverse order (Try it. If it's code that you have looked at, you should be able to understand the output.). You can also print the values of variables that appear on line 489 of tile1.c. If any of the values are unexpected, you need to start tracing your code (by hand, using printf's, or using some of the many features available in dbxtool). weimer@ssd.kodak.com ( Gary Weimer )